Sound Mixer Part 2 (#89251)

## About The Pull Request
Part 1 by grungussuss: https://github.com/tgstation/tgstation/pull/87529


![image](https://github.com/user-attachments/assets/7711dbe1-4a70-4cd4-9d82-8eb3fb60c9e9)
## Why It's Good For The Game

gives players more control over how loud they want certain sounds to be
## Changelog
🆑 Rengan
sound: the volume that vox, admin sound, insturments play at can now be
tweaked in preferences, check your preferences!
sound: Elevator now uses ambience volume preference, jukeboxes uses
instrument volume preference and end of round musics uses admin music
volume preference.
/🆑
This commit is contained in:
RengaN02
2025-02-17 00:25:56 +01:00
committed by GitHub
parent c06f1fa09f
commit 44d991b526
22 changed files with 115 additions and 158 deletions
+4 -3
View File
@@ -31,8 +31,9 @@ ADMIN_VERB(play_sound, R_SOUND, "Play Global Sound", "Play a sound to all connec
message_admins("[key_name_admin(user)] played sound [sound]")
for(var/mob/M in GLOB.player_list)
if(M.client.prefs.read_preference(/datum/preference/toggle/sound_midi))
admin_sound.volume = vol * M.client.admin_music_volume
var/volume_modifier = M.client.prefs.read_preference(/datum/preference/numeric/volume/sound_midi)
if(volume_modifier > 0)
admin_sound.volume = vol * M.client.admin_music_volume * (volume_modifier/100)
SEND_SOUND(M, admin_sound)
admin_sound.volume = vol
@@ -148,7 +149,7 @@ ADMIN_VERB(play_direct_mob_sound, R_SOUND, "Play Direct Mob Sound", "Play a soun
for(var/m in GLOB.player_list)
var/mob/M = m
var/client/C = M.client
if(C.prefs.read_preference(/datum/preference/toggle/sound_midi))
if(C.prefs.read_preference(/datum/preference/numeric/volume/sound_midi))
if(!stop_web_sounds)
C.tgui_panel?.play_music(web_sound_url, music_extra_data)
else