mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
fix omni atmospherics tgui (#8161)
This commit is contained in:
@@ -131,8 +131,8 @@
|
|||||||
if(portData.len)
|
if(portData.len)
|
||||||
data["ports"] = portData
|
data["ports"] = portData
|
||||||
if(output)
|
if(output)
|
||||||
data["set_flow_rate"] = round(set_flow_rate*10) //because nanoui can't handle rounded decimals.
|
data["set_flow_rate"] = round(set_flow_rate)
|
||||||
data["last_flow_rate"] = round(last_flow_rate*10)
|
data["last_flow_rate"] = round(last_flow_rate)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
/obj/machinery/atmospherics/omni/atmos_filter/tgui_act(action, params)
|
/obj/machinery/atmospherics/omni/atmos_filter/tgui_act(action, params)
|
||||||
if(..())
|
if(..())
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
switch(action)
|
switch(action)
|
||||||
if("power")
|
if("power")
|
||||||
if(!configuring)
|
if(!configuring)
|
||||||
@@ -266,4 +266,4 @@
|
|||||||
else
|
else
|
||||||
initialize_directions |= P.dir
|
initialize_directions |= P.dir
|
||||||
P.connect()
|
P.connect()
|
||||||
P.update = 1
|
P.update = 1
|
||||||
|
|||||||
@@ -158,8 +158,8 @@
|
|||||||
if(portData.len)
|
if(portData.len)
|
||||||
data["ports"] = portData
|
data["ports"] = portData
|
||||||
if(output)
|
if(output)
|
||||||
data["set_flow_rate"] = round(set_flow_rate*10) //because nanoui can't handle rounded decimals.
|
data["set_flow_rate"] = round(set_flow_rate)
|
||||||
data["last_flow_rate"] = round(last_flow_rate*10)
|
data["last_flow_rate"] = round(last_flow_rate)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@@ -294,4 +294,4 @@
|
|||||||
/obj/machinery/atmospherics/omni/mixer/proc/con_lock(var/port = NORTH)
|
/obj/machinery/atmospherics/omni/mixer/proc/con_lock(var/port = NORTH)
|
||||||
for(var/datum/omni_port/P in inputs)
|
for(var/datum/omni_port/P in inputs)
|
||||||
if(P.dir == port)
|
if(P.dir == port)
|
||||||
P.con_lock = !P.con_lock
|
P.con_lock = !P.con_lock
|
||||||
|
|||||||
@@ -111,11 +111,11 @@ export const OmniFilter = (props) => {
|
|||||||
{config ? (
|
{config ? (
|
||||||
<Button
|
<Button
|
||||||
icon="wrench"
|
icon="wrench"
|
||||||
content={set_flow_rate / 10 + ' L/s'}
|
content={set_flow_rate + ' L/s'}
|
||||||
onClick={() => act('set_flow_rate')}
|
onClick={() => act('set_flow_rate')}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
set_flow_rate / 10 + ' L/s'
|
set_flow_rate + ' L/s'
|
||||||
)}
|
)}
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
</LabeledList>
|
</LabeledList>
|
||||||
|
|||||||
@@ -91,11 +91,11 @@ export const OmniMixer = (props) => {
|
|||||||
{config ? (
|
{config ? (
|
||||||
<Button
|
<Button
|
||||||
icon="wrench"
|
icon="wrench"
|
||||||
content={set_flow_rate / 10 + ' L/s'}
|
content={set_flow_rate + ' L/s'}
|
||||||
onClick={() => act('set_flow_rate')}
|
onClick={() => act('set_flow_rate')}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
set_flow_rate / 10 + ' L/s'
|
set_flow_rate + ' L/s'
|
||||||
)}
|
)}
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
</LabeledList>
|
</LabeledList>
|
||||||
|
|||||||
Reference in New Issue
Block a user