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
This commit is contained in:
ARGUS
2026-03-20 00:29:50 +01:00
committed by GitHub
parent 6dace8160f
commit acc2f6046d
2 changed files with 3 additions and 3 deletions
@@ -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
+2 -2
View File
@@ -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