From acc2f6046dbf12cbf2028ddf4839be6117bb7337 Mon Sep 17 00:00:00 2001 From: ARGUS <268038739+ARGUS-Memory@users.noreply.github.com> Date: Fri, 20 Mar 2026 00:29:50 +0100 Subject: [PATCH] Fix jukebox volume setting (#19312) * Fi jukebox volume setting Jukebox volume is a 0-1 not a 0-100 :fenneko: * Apply 0-1 remap fixes to more media code --- code/modules/client/preferences/types/game/sound.dm | 2 +- code/modules/media/mediamanager.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/client/preferences/types/game/sound.dm b/code/modules/client/preferences/types/game/sound.dm index 9008db96d3..a93b1c33e1 100644 --- a/code/modules/client/preferences/types/game/sound.dm +++ b/code/modules/client/preferences/types/game/sound.dm @@ -254,7 +254,7 @@ step = 1 /datum/preference/numeric/living/jukebox_volume/apply_to_client_updated(client/client, value) - client?.media?.update_volume(value) + client?.media?.update_volume(value / 100) /datum/preference/numeric/volume abstract_type = /datum/preference/numeric/volume diff --git a/code/modules/media/mediamanager.dm b/code/modules/media/mediamanager.dm index 4c252431c5..0af46710e1 100644 --- a/code/modules/media/mediamanager.dm +++ b/code/modules/media/mediamanager.dm @@ -64,7 +64,7 @@ return var/value = tgui_input_number(user, "Choose your Jukebox volume.", "Jukebox volume", media.volume, 100, 0) value = round(max(0, min(100, value))) - media.update_volume(value) + media.update_volume(value / 100) // // ### Media procs on mobs ### @@ -108,7 +108,7 @@ var/start_time = 0 // world.time when it started playing *in the source* (Not when started playing for us) var/source_volume = 1 // Volume as set by source. Actual volume = "volume * source_volume" var/rate = 1 // Playback speed. For Fun(tm) - var/volume = 50 // Client's volume modifier. Actual volume = "volume * source_volume" + var/volume = 0.5 // Client's volume modifier. Actual volume = "volume * source_volume" var/client/owner // Client this is actually running in var/forced=0 // If true, current url overrides area media sources var/playerstyle // Choice of which player plugin to use