add option to disable end of round sound (#26014)

* add option to disable end of round sound

* fix sleep position

* add EOR sound to enable/disable preferences

* invert logic so that existing players don't mute the sound

* fix inconsistent mute/hear variable

---------

Co-authored-by: pwbokie <pmerkamp@butler.edu>
This commit is contained in:
Paul
2024-09-10 18:50:40 -04:00
committed by GitHub
parent 6c2d43ec5a
commit a00a036841
5 changed files with 21 additions and 2 deletions
+6 -2
View File
@@ -744,10 +744,14 @@ SUBSYSTEM_DEF(ticker)
if(end_string)
end_state = end_string
// Play a haha funny noise
// Play a haha funny noise for those who want to hear it :)
var/round_end_sound = pick(GLOB.round_end_sounds)
var/sound_length = GLOB.round_end_sounds[round_end_sound]
SEND_SOUND(world, sound(round_end_sound))
for(var/mob/M in GLOB.player_list)
if(!(M.client.prefs.sound & SOUND_MUTE_END_OF_ROUND))
SEND_SOUND(M, round_end_sound)
sleep(sound_length)
world.Reboot()