Makes the roundend theme a config (#61573)

This commit is contained in:
John Willard
2021-10-05 16:51:08 -07:00
committed by GitHub
parent 86abe4ec84
commit 9693fb456a
11 changed files with 10 additions and 12 deletions
+10 -12
View File
@@ -662,18 +662,7 @@ 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)
@@ -681,3 +670,12 @@ SUBSYSTEM_DEF(ticker)
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)]"