Skip to content

Commit

Permalink
add: halloween credits (#576)
Browse files Browse the repository at this point in the history
<!-- Пишите **НИЖЕ** заголовков и **ВЫШЕ** комментариев, иначе что то
может пойти не так. -->
<!-- Вы можете прочитать Contributing.MD, если хотите узнать больше. -->

## Что этот PR делает
По мелочи пофиксил некоторые мелочи титров.
Добавил **крупный** хэллоуинский апдейт для титров.
<!-- Вкратце опишите изменения, которые вносите. -->
<!-- Опишите **все** изменения, так как противное может сказаться на
рассмотрении этого PR'а! -->
<!-- Если вы исправляете Issue, добавьте "Fixes #1234" (где 1234 - номер
Issue) где-нибудь в описании PR'а. Это автоматически закроет Issue после
принятия PR'а. -->

## Почему это хорошо для игры
Хэллоуинские титры под хэллоуин это весело
<!-- Опишите, почему, по вашему, следует добавить эти изменения в игру.
-->

## Изображения изменений
<!-- Если вы не меняли карту или спрайты, можете опустить эту секцию.
Если хотите, можете вставить видео. -->

![image](https://github.com/ss220club/Paradise-SS220/assets/102746941/d010c8fd-27c0-4636-b6ed-c2a8d2a1cbce)

## Тестирование
<!-- Как вы тестировали свой PR, если делали это вовсе? -->
На локалочке проверил все что мог
## Changelog

:cl:
add: Хэллоуинские титры
add: Теперь донатеров показывает в титрах(при условии что донатер не
админ)
fix: Починил подтягивание стримеров из бд
soundadd: Добавил хэллоунский саундтрек
imageadd: Добавил хэллоуинский задник для титров
imageadd: Добавил спрайт тыквы с вырезанным лого НТ, sprite by @BAHO_777
/:cl:

<!-- Оба :cl:'а должны быть на месте, что-бы чейнджлог работал! Вы
можете написать свой ник справа от первого :cl:, если хотите. Иначе
будет использован ваш ник на ГитХабе. -->
<!-- Вы можете использовать несколько записей с одинаковым префиксом
(Они используются только для иконки в игре) и удалить ненужные. Помните,
что чейнджлог должен быть понятен обычным игроком. -->
<!-- Если чейнджлог не влияет на игроков(например, это рефактор), вы
можете исключить всю секцию. -->
  • Loading branch information
Legendaxe authored Oct 27, 2023
1 parent 225cf69 commit 59f4ae4
Show file tree
Hide file tree
Showing 15 changed files with 326 additions and 43 deletions.
2 changes: 1 addition & 1 deletion code/controllers/subsystem/SSticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ SUBSYSTEM_DEF(ticker)
for(var/datum/team/team in GLOB.antagonist_teams)
team.on_round_end()

play_cinematic(/datum/cinematic/credits, world)
SScredits.play_credits_cinematic()

// Display the scoreboard window
score.scoreboard()
Expand Down
10 changes: 10 additions & 0 deletions config/credits/jobs/halloweenstaffjobs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Зомби
Гуль
Призрак
Ответственный за гробы
Кладовщик
Олег
Дед инсайд
Страшила
Вурдалак
Вампир
1 change: 1 addition & 0 deletions config/credits/sounds/LICENSE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Twin Musicom - Spooky Ride.mp3 by Twin Musicom, under https://creativecommons.org/licenses/by/4.0/
Binary file not shown.
1 change: 1 addition & 0 deletions config/credits/titles/halloween_titles.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ХЭЛЛОУИНСКИЙ СПЕШЛ
10 changes: 10 additions & 0 deletions config/credits/titles/random_halloween_titles_masculine_2_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ХЭЛЛОУИНСКИЙ
ОМЕРЗИТЕЛЬНЫЙ
УСТРАШАЮЩИЙ
ЧУДОВИЩНЫЙ
ГНИЛОЙ
ПРИЗРАЧНЫЙ
МЕРЗОПАКОСТНЫЙ
СЛАДКИЙ
МОНСТРУОЗНЫЙ
ВЕСЕЛЫЙ
18 changes: 18 additions & 0 deletions config/credits/titles/random_halloween_titles_masculine_2_2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ОБЕД
ОЛЕГ
РАУНД
ПРИЗРАК
ДВИГАТЕЛЬ
МЕДВЕДЬ
КАПИТАН
МЕДБЕЙ
ОФИЦЕР
ПОВАР
ШАХТЕР
УЧЕНЫЙ
ИНЖЕНЕР
МЕХ
ПИЗДЕЦ
ЩИТСПАВН
КУЛЬТ
СРОЧНИК
20 changes: 19 additions & 1 deletion modular_ss220/cinematics/code/cinematics/credits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/datum/cinematic/credits/New(watcher, datum/callback/special_callback)
. = ..()
screen = new/obj/screen/cinematic/credits(src)
screen = new /obj/screen/cinematic/credits(src)

/datum/cinematic/credits/start_cinematic(list/watchers)
if(!(SEND_GLOBAL_SIGNAL(COMSIG_GLOB_PLAY_CINEMATIC, src) & COMPONENT_GLOB_BLOCK_CINEMATIC))
Expand All @@ -24,6 +24,7 @@
/datum/cinematic/credits/play_cinematic()

SScredits.roll_credits_for_clients(watching)

play_cinematic_sound(sound(SScredits.end_titles.soundtrack))

cleanup_time = SScredits.end_titles.playing_time + 3 SECONDS
Expand All @@ -43,8 +44,25 @@

SScredits.clear_credits(no_longer_watching)

/datum/cinematic/credits/halloween

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

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

/obj/screen/cinematic/credits
icon_state = "blank"
alpha = 0

/obj/screen/cinematic/credits/Initialize(mapload)
. = ..()

animate(src, alpha = 120, time = 3 SECONDS)

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

/obj/screen/fullscreen/cinematic_backdrop/credits
alpha = 0
Expand Down
1 change: 1 addition & 0 deletions modular_ss220/cinematics/icons/LICENSE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pumpkin screen image by Yuri_b from https://pixabay.com/illustrations/halloween-pumpkin-dark-background-1702677/ under https://pixabay.com/service/license-summary/
Binary file added 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,4 +1,5 @@
#include "code\SScredits.dm"
#include "code\credits.dm"
#include "code\halloween_credits.dm"

#include "_credits.dm"
16 changes: 14 additions & 2 deletions modular_ss220/credits/code/SScredits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,21 @@ SUBSYSTEM_DEF(credits)
/datum/controller/subsystem/credits/Initialize()
credit_animate_height = 16 * world.icon_size

/datum/controller/subsystem/credits/proc/roll_credits_for_clients(list/clients)
end_titles = new /datum/credits/default()
/datum/controller/subsystem/credits/proc/play_credits_cinematic()
var/cinematic_type

if(HALLOWEEN in SSholiday.holidays)
end_titles = new /datum/credits/halloween()
cinematic_type = /datum/cinematic/credits/halloween
else
end_titles = new /datum/credits/default()
cinematic_type = /datum/cinematic/credits

title_music = end_titles.soundtrack

play_cinematic(cinematic_type, world)

/datum/controller/subsystem/credits/proc/roll_credits_for_clients(list/clients)
end_titles.roll_credits_for_clients(clients)

/datum/controller/subsystem/credits/proc/clear_credits(client/client)
Expand Down
93 changes: 54 additions & 39 deletions modular_ss220/credits/code/credits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
/datum/credits/default/fill_credits()
credits += new /datum/credit/episode_title()
credits += new /datum/credit/streamers()
credits += new /datum/credit/donators()
credits += new /datum/credit/crewlist()
credits += new /datum/credit/corpses()
credits += new /datum/credit/staff()
Expand All @@ -97,8 +98,6 @@
/datum/credits/debug_large_credits

/datum/credits/debug_large_credits/fill_credits()
. = ..()

credits += new /datum/credit/disclaimer()
credits += new /datum/credit/disclaimer()
credits += new /datum/credit/disclaimer()
Expand Down Expand Up @@ -172,7 +171,7 @@
return

var/datum/db_query/ranks_ckey_read = SSdbcore.NewQuery(
"SELECT admin_rank, ckey FROM admin WHERE admin_rank=:rank",
"SELECT ckey FROM admin WHERE admin_rank=:rank",
list("rank" = "Банда"))

if(!ranks_ckey_read.warn_execute())
Expand All @@ -182,10 +181,10 @@
var/list/streamers = list()

while(ranks_ckey_read.NextRow())
var/client/client = get_client_by_ckey(ranks_ckey_read.item[2])
if(!client.mob?.name)
var/client/client = get_client_by_ckey(ranks_ckey_read.item[1])
if(!client?.mob?.name)
continue
streamers += "<center>[client.mob.name])] a.k.a. ([client.ckey])<center>"
streamers += "<center>([client.mob.name]) a.k.a. ([client.ckey])<center>"

qdel(ranks_ckey_read)

Expand All @@ -206,38 +205,36 @@

return streamers

/datum/credit/enormeus_crewlist_debug
/datum/credit/donators

/datum/credit/enormeus_crewlist_debug/New()
. = ..()

var/list/cast = list()
/datum/credit/donators/New()
var/list/donators = 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))
for(var/client/client in GLOB.clients)
if(!client.donator_level)
continue
if(!human.last_known_ckey)
if(client.holder)
continue
if(!length(donators))
donators += "<hr>"
donators += "<center><h1>Огромная благодарность меценатам:</h1></center>"

for(var/i = 0, i < 100, i++)
if(!length(cast) && !chunksize)
cast += "<hr>"
chunk += "<h1>В съемках участвовали:</h1>"
chunk += "[human.real_name] в роли [uppertext(human.mind.assigned_role)]"
chunksize++
if(chunksize > 2)
cast += "<center>[jointext(chunk,"<br>")]</center>"
chunk.Cut()
chunksize = 0
chunk += "[client.ckey] за [client.donator_level]-ый уровень подписки"
chunksize++

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

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

content += donators

content += cast

/datum/credit/crewlist

Expand All @@ -258,9 +255,9 @@
if(!human.mind?.assigned_role)
continue

if(!length(cast) && !chunksize)
if(!length(cast))
cast += "<hr>"
chunk += "<h1>В съемках участвовали:</h1>"
cast += "<center><h1>В съемках участвовали:</h1></center>"
chunk += "[human.real_name] в роли [uppertext(human.mind.assigned_role)]"
chunksize++
if(chunksize > 2)
Expand Down Expand Up @@ -324,27 +321,40 @@
/datum/credit/staff

/datum/credit/staff/New()
. = ..()

var/list/staff = list()
var/list/staffjobs = file2list("config/credits/jobs/staffjobs.txt")
var/list/chunk = list()
var/list/goodboys = list()
var/list/staffjobs = file2list("config/credits/jobs/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))
staff += "[uppertext(pick(staffjobs))] - '[client.key]'"
chunk += "[uppertext(pick(staffjobs))] - '[client.key]'"
chunksize++
else if(check_rights_client(R_MENTOR, FALSE, client))
goodboys += "[client.key]"

if(length(staff))
content += "<center><h1>Съемочная группа:<br></h1></center>"
content += "<hr>"
content += "<center>[jointext(staff,"<br>")]<br></center>"
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)]</center><br>"
content += "<center><h1>Мальчики на побегушках:<br></h1>[english_list(goodboys, and_text = " и " )]</center><br>"

/datum/credit/disclaimer

Expand Down Expand Up @@ -409,8 +419,13 @@
/obj/screen/credit/logo/Initialize(mapload, credited, client/client)
. = ..()
animate(src, alpha = 220, time = 3 SECONDS)
maptext = "<center><h1>Playing music - [SScredits.title_music]</h1></center>"
maptext_height = 10 * world.icon_size
maptext_x -= 5 * world.icon_size
maptext_y += 6 * world.icon_size
parent.screen += src


/obj/screen/credit/logo/rollem()
var/matrix/matrix = matrix(transform)
matrix.Translate(0, SScredits.credit_animate_height)
Expand Down
Loading

0 comments on commit 59f4ae4

Please sign in to comment.