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
@@ -1053,6 +1053,9 @@
if("hear_midis")
sound ^= SOUND_MIDI
if("mute_end_of_round")
sound ^= SOUND_MUTE_END_OF_ROUND
if("lobby_music")
sound ^= SOUND_LOBBY
if((sound & SOUND_LOBBY) && user.client)
@@ -440,6 +440,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
dat += "<b>TGUI strip menu size:</b> <a href='byond://?_src_=prefs;preference=tgui_strip_menu'>[toggles2 & PREFTOGGLE_2_BIG_STRIP_MENU ? "Full-size" : "Miniature"]</a><br>"
dat += "<b>Play Admin MIDIs:</b> <a href='byond://?_src_=prefs;preference=hear_midis'><b>[(sound & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>"
dat += "<b>Play Lobby Music:</b> <a href='byond://?_src_=prefs;preference=lobby_music'><b>[(sound & SOUND_LOBBY) ? "Yes" : "No"]</b></a><br>"
dat += "<b>Mute End Of Round Sounds:</b> <a href='byond://?_src_=prefs;preference=mute_end_of_round'><b>[(sound & SOUND_MUTE_END_OF_ROUND) ? "Yes" : "No"]</b></a><br>"
dat += "<b>Randomized Character Slot:</b> <a href='byond://?_src_=prefs;preference=randomslot'><b>[toggles2 & PREFTOGGLE_2_RANDOMSLOT ? "Yes" : "No"]</b></a><br>"
dat += "<b>View Range:</b> <a href='byond://?_src_=prefs;preference=setviewrange'>[viewrange]</a><br>"
dat += "<b>Window Flashing:</b> <a href='byond://?_src_=prefs;preference=winflash'>[(toggles2 & PREFTOGGLE_2_WINDOWFLASHING) ? "Yes" : "No"]</a><br>"
@@ -172,6 +172,16 @@
if(user.prefs.sound & ~SOUND_LOBBY)
usr.stop_sound_channel(CHANNEL_ADMIN)
/datum/preference_toggle/toggle_end_of_round_sound
name = "Toggle Mute End of Round Sound"
description = "Toggles muting the end of round sound"
preftoggle_bitflag = SOUND_MUTE_END_OF_ROUND
preftoggle_toggle = PREFTOGGLE_SOUND
preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
enable_message = "You have muted the end of round sound."
disable_message = "You have unmuted the end of round sound."
blackbox_message = "Toggle End of Round Sound"
/datum/preference_toggle/toggle_ooc
name = "Toggle OOC chat"
description = "Toggles seeing OutOfCharacter chat"