diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm
index 25ca2739782..72435141903 100644
--- a/code/__DEFINES/preferences.dm
+++ b/code/__DEFINES/preferences.dm
@@ -4,6 +4,7 @@
#define SOUND_MIDI (1<<1)
#define SOUND_AMBIENCE (1<<2)
#define SOUND_LOBBY (1<<3)
+#define SOUND_ENDOFROUND (1<<20)
#define MEMBER_PUBLIC (1<<4)
#define INTENT_STYLE (1<<5)
#define MIDROUND_ANTAG (1<<6)
@@ -22,7 +23,7 @@
#define DEADMIN_POSITION_SECURITY (1<<18)
#define DEADMIN_POSITION_SILICON (1<<19)
-#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
+#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_ENDOFROUND|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
//Chat toggles
#define CHAT_OOC (1<<0)
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 5544bd6e8c6..0eb7648be14 100755
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -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")
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index b27e33cc063..62f42ecf1fa 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -631,6 +631,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "
"
dat += "Play Admin MIDIs: [(toggles & SOUND_MIDI) ? "Enabled":"Disabled"]
"
dat += "Play Lobby Music: [(toggles & SOUND_LOBBY) ? "Enabled":"Disabled"]
"
+ dat += "Play End of Round Sounds: [(toggles & SOUND_ENDOFROUND) ? "Enabled":"Disabled"]
"
dat += "See Pull Requests: [(chat_toggles & CHAT_PULLR) ? "Enabled":"Disabled"]
"
dat += "
"
@@ -1638,6 +1639,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
else
user.stop_sound_channel(CHANNEL_LOBBYMUSIC)
+ if("endofround_sounds")
+ toggles ^= SOUND_ENDOFROUND
+
if("ghost_ears")
chat_toggles ^= CHAT_GHOSTEARS
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index b458d28841f..823a2c16ad9 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
-#define SAVEFILE_VERSION_MAX 32
+#define SAVEFILE_VERSION_MAX 33
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -53,6 +53,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(current_version < 32) //If you remove this, remove force_reset_keybindings() too.
addtimer(CALLBACK(src, .proc/force_reset_keybindings), 30) //No mob available when this is run, timer allows user choice.
+ if(current_version < 33)
+ toggles |= SOUND_ENDOFROUND
+
/datum/preferences/proc/update_character(current_version, savefile/S)
if(current_version < 19)
pda_style = "mono"
diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm
index b338dfe3767..145f854478d 100644
--- a/code/modules/client/preferences_toggles.dm
+++ b/code/modules/client/preferences_toggles.dm
@@ -144,6 +144,21 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggletitlemusic)()
return C.prefs.toggles & SOUND_LOBBY
+TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggleendofroundsounds)()
+ set name = "Hear/Silence End of Round Sounds"
+ set category = "Preferences"
+ set desc = "Hear Round End Sounds"
+ usr.client.prefs.toggles ^= SOUND_ENDOFROUND
+ usr.client.prefs.save_preferences()
+ if(usr.client.prefs.toggles & SOUND_ENDOFROUND)
+ to_chat(usr, "You will now hear sounds played before the server restarts.")
+ else
+ to_chat(usr, "You will no longer hear sounds played before the server restarts.")
+ SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle End of Round Sounds", "[usr.client.prefs.toggles & SOUND_ENDOFROUND ? "Enabled" : "Disabled"]"))
+/datum/verbs/menu/Settings/Sound/toggleendofroundsounds/Get_checked(client/C)
+ return C.prefs.toggles & SOUND_ENDOFROUND
+
+
TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, togglemidis)()
set name = "Hear/Silence Midis"
set category = "Preferences"