[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
+1 -1
View File
@@ -138,7 +138,7 @@
if(SOUND_EMITTER_GLOBAL)
hearing_mobs = GLOB.player_list.Copy()
for(var/mob/M in hearing_mobs)
if(M.client.prefs.toggles & SOUND_MIDI)
if(M.client.prefs.read_preference(/datum/preference/toggle/sound_midi))
M.playsound_local(M, sound_file, sound_volume, FALSE, channel = CHANNEL_ADMIN, pressure_affected = FALSE)
if(user)
log_admin("[ADMIN_LOOKUPFLW(user)] activated a sound emitter with file \"[sound_file]\" at [AREACOORD(src)]")
+2 -2
View File
@@ -36,7 +36,7 @@
message_admins("[key_name_admin(src)] played sound [S]")
for(var/mob/M in GLOB.player_list)
if(M.client.prefs.toggles & SOUND_MIDI)
if(M.client.prefs.read_preference(/datum/preference/toggle/sound_midi))
admin_sound.volume = vol * M.client.admin_music_volume
SEND_SOUND(M, admin_sound)
admin_sound.volume = vol
@@ -146,7 +146,7 @@
for(var/m in GLOB.player_list)
var/mob/M = m
var/client/C = M.client
if(C.prefs.toggles & SOUND_MIDI)
if(C.prefs.read_preference(/datum/preference/toggle/sound_midi))
if(!stop_web_sounds)
C.tgui_panel?.play_music(web_sound_url, music_extra_data)
else