[MIRROR] Some input updates (#7735)

Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2
2024-02-21 10:09:27 -07:00
committed by GitHub
parent 345ecb3167
commit 12370f4855
35 changed files with 580 additions and 477 deletions

View File

@@ -694,7 +694,7 @@
var/list/selected = TLV["temperature"]
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
var/input_temperature = tgui_input_number(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature)
var/input_temperature = tgui_input_number(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature, round_value = FALSE)
if(isnum(input_temperature))
if(input_temperature > max_temperature || input_temperature < min_temperature)
to_chat(usr, "Temperature must be between [min_temperature]C and [max_temperature]C")
@@ -748,7 +748,7 @@
var/env = params["env"]
var/name = params["var"]
var/value = tgui_input_number(usr, "New [name] for [env]:", name, TLV[env][name])
var/value = tgui_input_number(usr, "New [name] for [env]:", name, TLV[env][name], round_value = FALSE)
if(!isnull(value) && !..())
if(value < 0)
TLV[env][name] = -1