Final cleanup

This commit is contained in:
Arkatos
2020-02-18 15:32:48 +01:00
parent fe5742bab2
commit d37ea7cf19
5 changed files with 11 additions and 12 deletions
@@ -8,7 +8,7 @@
desc = "Regulates the transfer of air between two tanks."
w_class = WEIGHT_CLASS_BULKY
var/ui_x = 310
var/ui_y = 310
var/ui_y = 320
var/obj/item/tank/tank_one
var/obj/item/tank/tank_two
var/obj/item/assembly/attached_device
+4 -5
View File
@@ -124,9 +124,8 @@
/obj/item/assembly/prox_sensor/ui_data(mob/user)
var/list/data = list()
var/time_left = time
data["seconds"] = round(time_left % 60)
data["minutes"] = round((time_left - data["seconds"]) / 60)
data["seconds"] = round(time % 60)
data["minutes"] = round((time - data["seconds"]) / 60)
data["timing"] = timing
data["scanning"] = scanning
data["sensitivity"] = sensitivity
@@ -152,6 +151,6 @@
if("input")
var/value = text2num(params["adjust"])
if(value)
var/newtime = round(time+value)
time = CLAMP(newtime, 0, 600)
value = round(time + value)
time = CLAMP(value, 0, 600)
. = TRUE
+4 -4
View File
@@ -99,9 +99,8 @@
/obj/item/assembly/timer/ui_data(mob/user)
var/list/data = list()
var/time_left = time
data["seconds"] = round(time_left % 60)
data["minutes"] = round((time_left - data["seconds"]) / 60)
data["seconds"] = round(time % 60)
data["minutes"] = round((time - data["seconds"]) / 60)
data["timing"] = timing
data["loop"] = loop
return data
@@ -123,6 +122,7 @@
if("input")
var/value = text2num(params["adjust"])
if(value)
time = min(max(round(time+value), 1), 600)
value = round(time + value)
time = clamp(value, 1, 600)
saved_time = time
. = TRUE
@@ -44,7 +44,7 @@ export const TransferValve = props => {
</LabeledList.Item>
) : (
<NoticeBox textAlign="center">
Insert Attachment
Insert Assembly
</NoticeBox>
)}
</LabeledList>
File diff suppressed because one or more lines are too long