Skip to content

Commit

Permalink
gaxer review + title_music refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Legendaxe committed Oct 18, 2023
1 parent 419bde9 commit 4bbb6c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modular_ss220/cinematics/code/cinematics/credits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
start_cinematic(src.watching)

/datum/cinematic/credits/play_cinematic()
play_cinematic_sound(sound(SScredits.title_music, volume = 20))

SScredits.roll_credits_for_clients(watching)
play_cinematic_sound(sound(SScredits.end_titles.soundtrack, volume = 20))

cleanup_time = SScredits.end_titles.playing_time + 3 SECONDS

Expand Down
14 changes: 8 additions & 6 deletions modular_ss220/credits/code/SScredits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ SUBSYSTEM_DEF(credits)

/datum/controller/subsystem/credits/Initialize()
credit_animate_height = 16 * world.icon_size
title_music = pick(file2list("config/credits/sounds/title_music.txt"))


/datum/controller/subsystem/credits/proc/roll_credits_for_clients(list/clients)
end_titles = new /datum/credits/default()
Expand Down Expand Up @@ -63,10 +61,13 @@ SUBSYSTEM_DEF(credits)
/datum/credits
var/list/credits = list()
var/playing_time = 5 SECONDS
var/soundtrack

/datum/credits/New()
. = ..()

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

fill_credits()

count_time()
Expand Down Expand Up @@ -163,17 +164,18 @@ SUBSYSTEM_DEF(credits)
return

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

if(!ranks_ckey_read.warn_execute())
qdel(ranks_ckey_read)
return

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

qdel(ranks_ckey_read)

Expand Down

0 comments on commit 4bbb6c0

Please sign in to comment.