mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 20:57:23 +01:00
[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:
co-authored by
Heroman3003
Kashargul
parent
a7e4ef7dad
commit
0180cc74c5
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user