diff --git a/modular_ss220/credits/code/SScredits.dm b/modular_ss220/credits/code/SScredits.dm index d069c772e1af..d8c80be2f631 100644 --- a/modular_ss220/credits/code/SScredits.dm +++ b/modular_ss220/credits/code/SScredits.dm @@ -3,6 +3,8 @@ SUBSYSTEM_DEF(credits) runlevels = RUNLEVEL_POSTGAME flags = SS_NO_FIRE + var/datum/cinematic/credits/current_cinematic + var/datum/credits/end_titles var/title_music = "" @@ -25,7 +27,7 @@ SUBSYSTEM_DEF(credits) title_music = end_titles.soundtrack - play_cinematic(cinematic_type, world) + current_cinematic = play_cinematic(cinematic_type, world) /datum/controller/subsystem/credits/proc/roll_credits_for_clients(list/clients) end_titles.roll_credits_for_clients(clients) @@ -35,4 +37,5 @@ SUBSYSTEM_DEF(credits) return for(var/credit in client.credits) + client.screen -= credit QDEL_NULL(credit) diff --git a/modular_ss220/credits/code/credits.dm b/modular_ss220/credits/code/credits.dm index 9b807a7771f4..91dd23814ba5 100644 --- a/modular_ss220/credits/code/credits.dm +++ b/modular_ss220/credits/code/credits.dm @@ -2,6 +2,7 @@ /datum/credits var/list/credits = list() + var/list/screen_credits = list() var/playing_time var/delay_time = 5 SECONDS @@ -36,21 +37,17 @@ playing_time -= credit_spawn_speed playing_time += credit_roll_speed -/datum/credits/proc/roll_credits_for_clients(list/clients) +/datum/credits/proc/roll_credits_for_clients(list/client/clients) for(var/client/client in clients) - setup_credits_for_client(client) + LAZYINITLIST(client.credits) - addtimer(CALLBACK(src, PROC_REF(start_rolling_credits_for_clients), clients), delay_time) - -/datum/credits/proc/setup_credits_for_client(client/client) - LAZYINITLIST(client.credits) - - var/obj/screen/credit/logo = new /obj/screen/credit/logo(null, "", client) + var/obj/screen/credit/logo = new /obj/screen/credit/logo(null, "", clients) + screen_credits += logo - client.credits += logo + addtimer(CALLBACK(src, PROC_REF(start_rolling_credits_for_clients), clients), delay_time) -/datum/credits/proc/start_rolling_credits_for_clients(list/clients) - addtimer(CALLBACK(src, PROC_REF(start_rolling_logo_for_clients), clients,), SScredits.credit_roll_speed / 2.5) +/datum/credits/proc/start_rolling_credits_for_clients(list/client/clients) + addtimer(CALLBACK(src, PROC_REF(start_rolling_logo)), SScredits.credit_roll_speed / 2.5) for(var/datum/credit/credit in credits) for(var/item in credit.content) @@ -59,30 +56,26 @@ addtimer(CALLBACK(src, PROC_REF(clear_credits_for_clients), clients), SScredits.credit_roll_speed) -/datum/credits/proc/start_rolling_logo_for_clients(list/clients) - for(var/client/client in clients) - if(!client?.credits) - continue - - var/obj/screen/credit/logo/logo = client.credits[1] - logo.rollem() +/datum/credits/proc/start_rolling_logo() + var/obj/screen/credit/logo/logo = screen_credits[1] + logo.rollem() /datum/credits/proc/start_rolling_credit_item(list/clients, credit_item) - for(var/client/client in clients) - if(!client?.credits) - continue + var/obj/screen/credit/title = new(null, credit_item, clients) + screen_credits += title - var/obj/screen/credit/title = new(null, credit_item, client) - client.credits += title - title.rollem() + title.rollem() /datum/credits/proc/clear_credits_for_clients(list/clients) + screen_credits.Cut() + for(var/client/client in clients) if(!client?.credits) continue SScredits.clear_credits(client) + SScredits.current_cinematic = null /datum/credits/default @@ -171,8 +164,13 @@ return var/datum/db_query/ranks_ckey_read = SSdbcore.NewQuery( - "SELECT ckey FROM admin WHERE admin_rank=:rank", - list("rank" = "Банда")) + "SELECT ckey FROM admin WHERE admin_rank=:rank OR admin_rank=:rank1 OR admin_rank=:rank2 OR admin_rank=:rank3", + list( + "rank" = "Банда", + "rank1" = "Братюня", + "rank2" = "Максон", + "rank3" = "Сестрюня" + )) if(!ranks_ckey_read.warn_execute()) qdel(ranks_ckey_read) @@ -216,7 +214,7 @@ for(var/client/client in GLOB.clients) if(!client.donator_level) continue - if(client.holder) + if(client.donator_level > DONATOR_LEVEL_MAX) continue if(!length(donators)) donators += "