mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
TGUI Input Conversions
This commit is contained in:
@@ -505,14 +505,14 @@
|
||||
|
||||
switch(action)
|
||||
if("set_range")
|
||||
var/new_range = input(usr, "Enter new field range (1-[world.maxx]). Leave blank to cancel.", "Field Radius Control", field_radius) as num
|
||||
var/new_range = tgui_input_number(usr, "Enter new field range (1-[world.maxx]). Leave blank to cancel.", "Field Radius Control", field_radius, world.maxx, 1)
|
||||
if(!new_range)
|
||||
return TRUE
|
||||
target_radius = between(1, new_range, world.maxx)
|
||||
return TRUE
|
||||
|
||||
if("set_input_cap")
|
||||
var/new_cap = round(input(usr, "Enter new input cap (in kW). Enter 0 or nothing to disable input cap.", "Generator Power Control", round(input_cap / 1000)) as num)
|
||||
var/new_cap = round(tgui_input_number(usr, "Enter new input cap (in kW). Enter 0 or nothing to disable input cap.", "Generator Power Control", round(input_cap / 1000)))
|
||||
if(!new_cap)
|
||||
input_cap = 0
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user