Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added: new year credits #884

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions config/credits/jobs/new_year_staffjobs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Рудольф
Ответственный за сани
Эльф
Снеговик
Сосулька
Гринч
Снежинка
Дух Прошлого Рождества
Дух Настоящего Рождества
Дух Будущего Рождества
Скрудж
4 changes: 4 additions & 0 deletions config/credits/sounds/LICENSE.MD
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
##################################################################################################

Twin Musicom - Spooky Ride.mp3 by Twin Musicom, under https://creativecommons.org/licenses/by/4.0/

##################################################################################################
1 change: 1 addition & 0 deletions config/credits/sounds/new_year_title_music.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config/credits/sounds/space_asshole.ogg
1 change: 1 addition & 0 deletions config/credits/titles/new_year_titles.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
НОВОГОДНИЙ СПЕШЛ
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
НОВОГОДНИЙ
ПРАЗДНИЧНЫЙ
ЛЕДЯНОЙ
ПОДАРОЧНЫЙ
СКАЗОЧНЫЙ
СНЕЖНЫЙ
УЮТНЫЙ
ХОХОХОШНЫЙ
РАЗВЛЕКАТЕЛЬНЫЙ
18 changes: 18 additions & 0 deletions config/credits/titles/random_new_year_titles_masculine_2_2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
СНЕГОВИК
ПРАЗДНИК
ГЛИНТВЕЙН
ХОЛОДИЛЬНИК
ОЛЕНЬ
РАУНД
ДВИГАТЕЛЬ
КАПИТАН
МЕДБЕЙ
ОФИЦЕР
ПОВАР
ШАХТЕР
УЧЕНЫЙ
ИНЖЕНЕР
ПИЗДЕЦ
ЩИТСПАВН
СРОЧНИК
ОЛЕГ
11 changes: 11 additions & 0 deletions modular_ss220/cinematics/code/cinematics/credits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@

screen = new /obj/screen/cinematic/credits/halloween()

/datum/cinematic/credits/new_year

/datum/cinematic/credits/new_year/New(watcher, datum/callback/special_callback)
. = ..()

screen = new /obj/screen/cinematic/credits/new_year()

/obj/screen/cinematic/credits
icon_state = "blank"
alpha = 0
Expand All @@ -64,6 +71,10 @@
icon = 'modular_ss220/cinematics/icons/backdrops.dmi'
icon_state = "halloween"

/obj/screen/cinematic/credits/new_year
icon = 'modular_ss220/cinematics/icons/backdrops.dmi'
icon_state = "new_year"

/obj/screen/fullscreen/cinematic_backdrop/credits
alpha = 0

Expand Down
4 changes: 4 additions & 0 deletions modular_ss220/cinematics/icons/LICENSE.MD
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#####################################################################################################################################################################
pumpkin screen image by Yuri_b from https://pixabay.com/illustrations/halloween-pumpkin-dark-background-1702677/ under https://pixabay.com/service/license-summary/
#####################################################################################################################################################################
red christmas background by monicore from https://pixabay.com/illustrations/red-christmas-tree-christmas-2892235/ under https://pixabay.com/service/license-summary/
#####################################################################################################################################################################
Binary file modified modular_ss220/cinematics/icons/backdrops.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions modular_ss220/credits/_credits.dme
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "code\SScredits.dm"
#include "code\credits.dm"
#include "code\halloween_credits.dm"
#include "code\new_year_credits.dm"

#include "_credits.dm"
10 changes: 5 additions & 5 deletions modular_ss220/credits/code/SScredits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ SUBSYSTEM_DEF(credits)
/datum/controller/subsystem/credits/proc/play_credits_cinematic()
var/cinematic_type

if(HALLOWEEN in SSholiday.holidays)
if(NEW_YEAR in SSholiday.holidays)
end_titles = new /datum/credits/new_year()
cinematic_type = /datum/cinematic/credits/new_year
else if(HALLOWEEN in SSholiday.holidays)
end_titles = new /datum/credits/halloween()
cinematic_type = /datum/cinematic/credits/halloween
else
Expand All @@ -33,10 +36,7 @@ SUBSYSTEM_DEF(credits)
end_titles.roll_credits_for_clients(clients)

/datum/controller/subsystem/credits/proc/clear_credits(client/client)
if(!client)
if(!client?.credits)
return

for(var/credit in client.credits)
client.screen -= credit

client.credits.Cut()
4 changes: 3 additions & 1 deletion modular_ss220/credits/code/credits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
. = ..()

credit_animate_height = 16 * world.icon_size
var/list/title_musics = file2list("config/credits/sounds/title_music.txt")
title_musics.Remove("")

soundtrack = pick(file2list("config/credits/sounds/title_music.txt"))
soundtrack = pick(title_musics)

fill_credits()

Expand Down
150 changes: 150 additions & 0 deletions modular_ss220/credits/code/new_year_credits.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
/datum/credits/new_year/New()
. = ..()
var/list/new_year_musics = file2list("config/credits/sounds/new_year_title_music.txt")
new_year_musics.Remove("")

soundtrack = pick(new_year_musics)

/datum/credits/new_year/fill_credits()
credits += new /datum/credit/episode_title/new_year()
credits += new /datum/credit/streamers()
credits += new /datum/credit/donators/new_year()
credits += new /datum/credit/crewlist/new_year()
credits += new /datum/credit/corpses/new_year()
credits += new /datum/credit/staff/new_year()
credits += new /datum/credit/disclaimer()

/datum/credit/episode_title/new_year/New()
var/episode_title = ""

var/list/titles = list()

titles["finished"] = file2list("config/credits/titles/new_year_titles.txt")
titles["masculine1"] = file2list("config/credits/titles/random_new_year_titles_masculine_2_1.txt")
titles["masculine2"] = file2list("config/credits/titles/random_new_year_titles_masculine_2_2.txt")

for(var/possible_titles in titles)
LAZYREMOVEASSOC(titles, possible_titles, "")

switch(rand(1,100))
if(1 to 10)
episode_title += pick(titles["finished"])
if(11 to 100)
episode_title += "[pick(titles["masculine1"])] [pick(titles["masculine2"])]"

content += "<center><h1>🎃EPISODE [GLOB.round_id]🎃<br><h1>[episode_title]</h1></h1></center>"

/datum/credit/donators/new_year/New()
var/list/donators = list()
var/list/chunk = list()

var/chunksize = 0

for(var/client/client in GLOB.clients)
if(!client.donator_level)
continue
if(client.donator_level > DONATOR_LEVEL_MAX)
continue
if(!length(donators))
donators += "<hr>"
donators += "<center><h1>Дети которые хорошо себя вели:</h1></center>"

chunk += "[client.ckey] [client.donator_level]-ого уровеня подписки"
chunksize++

if(chunksize > 2)
donators += "<center>[jointext(chunk,"<br>")]</center>"
chunk.Cut()
chunksize = 0

if(length(chunk))
donators += "<center>[jointext(chunk,"<br>")]</center>"

content += donators

/datum/credit/crewlist/new_year/New()
var/list/cast = list()
var/list/chunk = list()
var/chunksize = 0

for(var/mob/living/carbon/human/human in GLOB.alive_mob_list | GLOB.dead_mob_list)
if(findtext(human.real_name,"(mannequin)"))
continue
if(ismonkeybasic(human))
continue
if(!human.last_known_ckey)
continue
if(!human.mind?.assigned_role)
continue

if(!length(cast))
cast += "<hr>"
cast += "<center><h1>Участники новогоднего представления:</h1></center>"
chunk += "[human.real_name] в роли [uppertext(human.mind.assigned_role)]"
chunksize++
if(chunksize > 2)
cast += "<center>[jointext(chunk,"<br>")]</center>"
chunk.Cut()
chunksize = 0

if(length(chunk))
cast += "<center>[jointext(chunk,"<br>")]</center>"

content += cast

/datum/credit/corpses/new_year/New()
. = ..()

var/list/corpses = list()

for(var/mob/living/carbon/human/human in GLOB.dead_mob_list)
if(!human.last_known_ckey)
continue
else if(human.real_name)
corpses += human.real_name

if(length(corpses))
content += "<hr>"
content += "<center><h1>Дети которые плохо себя вели:<br></h1></center>"
while(length(corpses) > 10)
content += "<center>[jointext(corpses, ", ", 1, 10)],</center>"
corpses.Cut(1, 10)

if(length(corpses))
content += "<center>[jointext(corpses, ", ")].</center>"

/datum/credit/staff/new_year/New()
var/list/staff = list()
var/list/chunk = list()
var/list/goodboys = list()
var/list/staffjobs = file2list("config/credits/jobs/new_year_staffjobs.txt")

staffjobs.Remove("")

var/chunksize = 0

for(var/client/client in GLOB.clients)
if(!client.holder)
continue
if(!length(staff))
staff += "<hr>"
staff += "<center><h1>Помощники Санты:</h1></center>"

if(check_rights_client(R_DEBUG|R_ADMIN|R_MOD, FALSE, client))
chunk += "[uppertext(pick(staffjobs))] - '[client.key]'"
chunksize++
else if(check_rights_client(R_MENTOR, FALSE, client))
goodboys += "[client.key]"

if(chunksize > 2)
staff += "<center>[jointext(chunk,"<br>")]</center>"
chunk.Cut()
chunksize = 0

if(length(chunk))
staff += "<center>[jointext(chunk,"<br>")]</center>"

content += staff

if(length(goodboys))
content += "<center><h1>Олени Санты:<br></h1>[english_list(goodboys, and_text = " и " )]</center><br>"