mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
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:
@@ -10,6 +10,7 @@
|
||||
#define SOUND_DISCO (1<<8)
|
||||
#define SOUND_AI_VOICE (1<<9)
|
||||
#define SOUND_PRAYERNOTIFY (1<<10)
|
||||
#define SOUND_MUTE_END_OF_ROUND (1<<11)
|
||||
|
||||
#define SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_HEARTBEAT|SOUND_BUZZ|SOUND_INSTRUMENTS|SOUND_MENTORHELP|SOUND_DISCO|SOUND_AI_VOICE|SOUND_PRAYERNOTIFY)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user