Mass-replacement of stat to machine_stat (#48758)

Living and machine stat vars are pretty different, one uses flags and other number-defines.
This should make some other mass-replacements and searches a bit easier.
This commit is contained in:
Rohesie
2020-01-24 12:37:17 +13:00
committed by oranges
parent b961d49f5b
commit 7bef84f009
131 changed files with 422 additions and 416 deletions
@@ -64,7 +64,7 @@
to_chat(user, "<span class='warning'>Access denied.</span>")
return
if(controller && !controller.busy && door)
if(controller.stat & NOPOWER)
if(controller.machine_stat & NOPOWER)
return
busy = TRUE
update_icon()
@@ -83,7 +83,7 @@
update_icon()
/obj/machinery/doorButtons/access_button/update_icon_state()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
icon_state = "access_button_off"
else
if(busy)
@@ -162,7 +162,7 @@
A.safe = FALSE //Door crushies, manual door after all. Set every time in case someone changed it, safe doors can end up waiting forever.
A.unbolt()
if(A.close())
if(stat & NOPOWER || lostPower || !A || QDELETED(A))
if(machine_stat & NOPOWER || lostPower || !A || QDELETED(A))
goIdle(TRUE)
return FALSE
A.bolt()
@@ -209,7 +209,7 @@
/obj/machinery/doorButtons/airlock_controller/proc/do_openDoor(obj/machinery/door/airlock/A)
if(A && A.open())
if(stat | (NOPOWER) && !lostPower && A && !QDELETED(A))
if(machine_stat | (NOPOWER) && !lostPower && A && !QDELETED(A))
A.bolt()
goIdle(TRUE)
@@ -221,7 +221,7 @@
updateUsrDialog()
/obj/machinery/doorButtons/airlock_controller/process()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
return
if(busy == CYCLE_EXTERIOR)
cycleOpen(exteriorAirlock)
@@ -230,7 +230,7 @@
/obj/machinery/doorButtons/airlock_controller/power_change()
. = ..()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
lostPower = TRUE
else
if(!busy)
@@ -244,7 +244,7 @@
exteriorAirlock = A
/obj/machinery/doorButtons/airlock_controller/update_icon_state()
if(stat & NOPOWER)
if(machine_stat & NOPOWER)
icon_state = "access_control_off"
return
if(busy || lostPower)