Autolathe disable wire actually disables autolathe (#14903)

* Autolathe disable wire actually disables autolathe

* Cutting wire disables TGUI instead of closing it.

* Now disabled TGUI instead of closing it

* Queue emptying statement now actually valid

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* Minor spacing fix

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
Adrer
2020-11-16 10:15:02 +00:00
committed by GitHub
co-authored by AffectedArc07
parent faa14aa7a6
commit 5c35e4e6d4
+7 -2
View File
@@ -79,7 +79,7 @@
if(panel_open)
wires.Interact(user)
else
else if(!disabled)
tgui_interact(user)
/obj/machinery/autolathe/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
@@ -202,6 +202,11 @@
process_queue()
busy = FALSE
/obj/machinery/autolathe/tgui_status(mob/user, datum/tgui_state/state)
. = disabled ? STATUS_DISABLED : STATUS_INTERACTIVE
return min(..(), .)
/obj/machinery/autolathe/proc/design_cost_data(datum/design/D)
var/list/data = list()
var/coeff = get_coeff(D)
@@ -445,7 +450,7 @@
else
return
while(D)
if(stat & (NOPOWER|BROKEN))
if((stat & (NOPOWER|BROKEN)) || disabled)
being_built = new /list()
return 0
if(!can_build(D, multiplier))