Skip to content

Commit

Permalink
Makes the roundend theme a config (#61573)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnFulpWillard authored Oct 5, 2021
1 parent 86abe4e commit 9693fb4
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -662,22 +662,20 @@ SUBSYSTEM_DEF(ticker)
save_admin_data()
update_everything_flag_in_db()
if(!round_end_sound)
round_end_sound = pick(\
'sound/roundend/newroundsexy.ogg',
'sound/roundend/apcdestroyed.ogg',
'sound/roundend/bangindonk.ogg',
'sound/roundend/leavingtg.ogg',
'sound/roundend/its_only_game.ogg',
'sound/roundend/yeehaw.ogg',
'sound/roundend/disappointed.ogg',
'sound/roundend/scrunglartiy.ogg',
'sound/roundend/petersondisappointed.ogg',
'sound/roundend/bully2.ogg'\
)
round_end_sound = choose_round_end_song()
///The reference to the end of round sound that we have chosen.
var/sound/end_of_round_sound_ref = sound(round_end_sound)
for(var/mob/M in GLOB.player_list)
if(M.client.prefs?.toggles & SOUND_ENDOFROUND)
SEND_SOUND(M.client, end_of_round_sound_ref)

text2file(login_music, "data/last_round_lobby_music.txt")

/datum/controller/subsystem/ticker/proc/choose_round_end_song()
var/list/reboot_sounds = flist("[global.config.directory]/reboot_themes/")
var/list/possible_themes = list()

for(var/themes in reboot_sounds)
possible_themes += themes
if(possible_themes.len)
return "[global.config.directory]/reboot_themes/[pick(possible_themes)]"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9693fb4

Please sign in to comment.