[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 23:27:14 +01:00
committed by GitHub
parent d4601ae5bc
commit fd699e46ce
27 changed files with 167 additions and 279 deletions
@@ -85,7 +85,7 @@
if(player && HAS_TRAIT(player, TRAIT_MUSICIAN) && isliving(M))
var/mob/living/L = M
L.apply_status_effect(/datum/status_effect/good_music)
if(!(M?.client?.prefs?.toggles & SOUND_INSTRUMENTS))
if(!(M?.client?.prefs.read_preference(/datum/preference/toggle/sound_instruments)))
continue
M.playsound_local(source, null, volume * using_instrument.volume_multiplier, sound_to_use = music_played)
// Could do environment and echo later but not for now
@@ -65,7 +65,7 @@
if(player && HAS_TRAIT(player, TRAIT_MUSICIAN) && isliving(M))
var/mob/living/L = M
L.apply_status_effect(/datum/status_effect/good_music)
if(!(M?.client?.prefs?.toggles & SOUND_INSTRUMENTS))
if(!(M?.client?.prefs.read_preference(/datum/preference/toggle/sound_instruments)))
continue
M.playsound_local(get_turf(parent), null, volume, FALSE, K.frequency, null, channel, null, copy)
// Could do environment and echo later but not for now