diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 1240fca786d..3237555a3d6 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -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)]" diff --git a/sound/roundend/apcdestroyed.ogg b/config/reboot_themes/apcdestroyed.ogg similarity index 100% rename from sound/roundend/apcdestroyed.ogg rename to config/reboot_themes/apcdestroyed.ogg diff --git a/sound/roundend/bangindonk.ogg b/config/reboot_themes/bangindonk.ogg similarity index 100% rename from sound/roundend/bangindonk.ogg rename to config/reboot_themes/bangindonk.ogg diff --git a/sound/roundend/bully2.ogg b/config/reboot_themes/bully2.ogg similarity index 100% rename from sound/roundend/bully2.ogg rename to config/reboot_themes/bully2.ogg diff --git a/sound/roundend/disappointed.ogg b/config/reboot_themes/disappointed.ogg similarity index 100% rename from sound/roundend/disappointed.ogg rename to config/reboot_themes/disappointed.ogg diff --git a/sound/roundend/its_only_game.ogg b/config/reboot_themes/its_only_game.ogg similarity index 100% rename from sound/roundend/its_only_game.ogg rename to config/reboot_themes/its_only_game.ogg diff --git a/sound/roundend/leavingtg.ogg b/config/reboot_themes/leavingtg.ogg similarity index 100% rename from sound/roundend/leavingtg.ogg rename to config/reboot_themes/leavingtg.ogg diff --git a/sound/roundend/newroundsexy.ogg b/config/reboot_themes/newroundsexy.ogg similarity index 100% rename from sound/roundend/newroundsexy.ogg rename to config/reboot_themes/newroundsexy.ogg diff --git a/sound/roundend/petersondisappointed.ogg b/config/reboot_themes/petersondisappointed.ogg similarity index 100% rename from sound/roundend/petersondisappointed.ogg rename to config/reboot_themes/petersondisappointed.ogg diff --git a/sound/roundend/scrunglartiy.ogg b/config/reboot_themes/scrunglartiy.ogg similarity index 100% rename from sound/roundend/scrunglartiy.ogg rename to config/reboot_themes/scrunglartiy.ogg diff --git a/sound/roundend/yeehaw.ogg b/config/reboot_themes/yeehaw.ogg similarity index 100% rename from sound/roundend/yeehaw.ogg rename to config/reboot_themes/yeehaw.ogg