Adds an End of Round Sound Toggle Preference (#49805)

* how about yee(naw)

* Fixes an issue with order in preferences.dm and adds a null check in ticker.dm

* updates the savefile max ver and adds a condition for it in update_preferences

* Puts the call sound(round_end_sound) outside of the loop into a variable that we insert the reference into the loop.
This commit is contained in:
KomradeSpectre
2020-03-14 12:34:04 +01:00
committed by GitHub
parent ef6e994891
commit 05b64182a9
5 changed files with 30 additions and 3 deletions
+5 -1
View File
@@ -643,6 +643,10 @@ SUBSYSTEM_DEF(ticker)
'sound/roundend/scrunglartiy.ogg',
'sound/roundend/petersondisappointed.ogg'\
)
///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)
SEND_SOUND(world, sound(round_end_sound))
text2file(login_music, "data/last_round_lobby_music.txt")