[MIRROR] Refactors sound toggle prefs away from legacy toggles, introduces a new sound pref for jukeboxes [MDB IGNORE] (#17413)

* Refactors sound toggle prefs away from legacy toggles, introduces a new sound pref for jukeboxes

* Update living_defense.dm

* fix

* Update deprivation_helmet.dm

Co-authored-by: Thunder12345 <Thunder12345@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-11-10 14:27:14 -08:00
committed by GitHub
co-authored by Thunder12345 Zonespace
parent d4601ae5bc
commit fd699e46ce
27 changed files with 167 additions and 279 deletions
+1 -1
View File
@@ -707,7 +707,7 @@ SUBSYSTEM_DEF(ticker)
///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)
if(M.client.prefs.read_preference(/datum/preference/toggle/sound_endofround))
SEND_SOUND(M.client, end_of_round_sound_ref)
text2file(login_music, "data/last_round_lobby_music.txt")
+1 -1
View File
@@ -194,7 +194,7 @@ SUBSYSTEM_DEF(vote)
new_voter.player_details.player_actions += voting_action
generated_actions += voting_action
if(current_vote.vote_sound && (new_voter.prefs.toggles & SOUND_ANNOUNCEMENTS))
if(current_vote.vote_sound && (new_voter.prefs.read_preference(/datum/preference/toggle/sound_announcements)))
SEND_SOUND(new_voter, sound(current_vote.vote_sound))
return TRUE