[MIRROR] usr to user up to player effects (#9552)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2024-12-01 18:31:19 +01:00
committed by GitHub
co-authored by Heroman3003 Kashargul
parent a7e4ef7dad
commit 0180cc74c5
297 changed files with 1866 additions and 1893 deletions
@@ -40,7 +40,7 @@
var/channel = href_list["change_volume"]
if(!(channel in pref.volume_channels))
pref.volume_channels["[channel]"] = 1
var/value = tgui_input_number(user, "Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100), 200, 0) //ChompEDIT - usr removal
var/value = tgui_input_number(user, "Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100), 200, 0)
if(isnum(value))
value = CLAMP(value, 0, 200)
pref.volume_channels["[channel]"] = (value / 100)
@@ -79,14 +79,14 @@
data["volume_channels"] = user.client.prefs.volume_channels
return data
/datum/volume_panel/tgui_act(action, params)
/datum/volume_panel/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
if(!usr?.client?.prefs)
if(!ui.user?.client?.prefs)
return TRUE
var/datum/preferences/P = usr.client.prefs
var/datum/preferences/P = ui.user.client.prefs
switch(action)
if("adjust_volume")
var/channel = params["channel"]