Jukebox volume fixes (#90417)

## About The Pull Request

- Fixes jukebox volume reverting to 100% instead of preference setting
when adjusted at the jukebox.
- Fixes jukebox volume preference not applying to active jukebox music
track
- Splits jukebox and instrument into two different preferences.

## Why It's Good For The Game

The jukebox volume correctly updates and remains at what the player
sets.

## Changelog

🆑 LT3
fix: Jukebox volume preference applies to currently playing music
fix: Jukebox volume no longer resets to 100% when adjusted from the
object
/🆑
This commit is contained in:
LT3
2025-04-05 22:27:05 +02:00
committed by GitHub
parent f0c8cc1e1b
commit b1ee40b157
4 changed files with 34 additions and 7 deletions
+10 -3
View File
@@ -38,9 +38,16 @@
savefile_key = "sound_instruments"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/volume/sound_instruments/apply_to_client_updated(client/client, value)
if (!value)
client.mob.stop_sound_channel(CHANNEL_JUKEBOX)
/// Controls jukebox track volume
/datum/preference/numeric/volume/sound_jukebox
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_jukebox"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/volume/sound_jukebox/apply_to_client_updated(client/client, value)
var/mob/client_mob = client.mob
if(!isnull(client_mob))
SEND_SIGNAL(client_mob, COMSIG_MOB_JUKEBOX_PREFERENCE_APPLIED)
/datum/preference/choiced/sound_tts
category = PREFERENCE_CATEGORY_GAME_PREFERENCES