Fixes the exosuit mounted autolathe. (#18440)

* autolathe1

* cl

* Oops

* pay the price

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2024-02-20 11:58:39 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 60729d5a78
commit e063223199
71 changed files with 171 additions and 102 deletions
@@ -77,7 +77,7 @@
if(href_list["set_global_limit"])
var/newlim = tgui_input_number(usr, "Input the new thrust limit.", "Thrust Limit", connected.thrust_limit*100, 100, 0)
if(!CanInteract(usr, physical_state))
if(!CanInteract(usr, GLOB.physical_state))
return TOPIC_NOACTION
connected.thrust_limit = Clamp(newlim/100, 0, 1)
for(var/datum/ship_engine/E in connected.engines)
@@ -94,7 +94,7 @@
if(href_list["set_limit"])
var/datum/ship_engine/E = locate(href_list["engine"])
var/newlim = tgui_input_number(usr, "Input the new thrust limit.", "Thrust Limit", E.get_thrust_limit(), 100, 0)
if(!CanInteract(usr, physical_state))
if(!CanInteract(usr, GLOB.physical_state))
return
var/limit = Clamp(newlim/100, 0, 1)
if(istype(E))
+5 -5
View File
@@ -194,7 +194,7 @@
if(action == "add")
var/datum/computer_file/data/waypoint/R = new()
var/sec_name = input("Input naviation entry name", "New navigation entry", "Sector #[known_sectors.len]") as text
if(!CanInteract(usr, physical_state))
if(!CanInteract(usr, GLOB.physical_state))
return FALSE
if(!sec_name)
sec_name = "Sector #[known_sectors.len]"
@@ -208,10 +208,10 @@
R.fields["y"] = connected.y
if("new")
var/newx = input("Input new entry x coordinate", "Coordinate input", connected.x) as num
if(!CanInteract(usr, physical_state))
if(!CanInteract(usr, GLOB.physical_state))
return TRUE
var/newy = input("Input new entry y coordinate", "Coordinate input", connected.y) as num
if(!CanInteract(usr, physical_state))
if(!CanInteract(usr, GLOB.physical_state))
return FALSE
R.fields["x"] = Clamp(newx, 1, world.maxx)
R.fields["y"] = Clamp(newy, 1, world.maxy)
@@ -225,14 +225,14 @@
if (action == "setx")
var/newx = input("Input new destination x coordinate", "Coordinate input", dx) as num|null
if(!CanInteract(usr, physical_state))
if(!CanInteract(usr, GLOB.physical_state))
return
if (newx)
dx = Clamp(newx, 1, world.maxx)
if (action == "sety")
var/newy = input("Input new destination y coordinate", "Coordinate input", dy) as num|null
if(!CanInteract(usr, physical_state))
if(!CanInteract(usr, GLOB.physical_state))
return
if (newy)
dy = Clamp(newy, 1, world.maxy)
@@ -256,14 +256,14 @@
if(sensors)
if (action == "range")
var/nrange = tgui_input_number("Set new sensors range", "Sensor range", sensors.range, sensors.max_range, 1)
if(!CanInteract(usr, default_state))
if(!CanInteract(usr, GLOB.default_state))
return FALSE
if (nrange)
sensors.set_desired_range(Clamp(nrange, 1, sensors.max_range))
return TRUE
if(action == "range_choice")
var/nrange = text2num(params["range_choice"])
if(!CanInteract(usr, default_state))
if(!CanInteract(usr, GLOB.default_state))
return FALSE
if(nrange)
sensors.set_desired_range(Clamp(nrange, 1, sensors.max_range))
@@ -59,7 +59,7 @@
D = tgui_input_list(usr, "Choose shuttle destination.", "Shuttle Destination", possible_d)
else
to_chat(usr, SPAN_WARNING("No valid landing sites in range."))
if(CanInteract(user, physical_state) && (D in possible_d))
if(CanInteract(user, GLOB.physical_state) && (D in possible_d))
shuttle.set_destination(possible_d[D])
return TRUE