mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
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:
@@ -237,7 +237,7 @@
|
||||
. = ..()
|
||||
if(loaded_tank)
|
||||
. += "ptank"
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
. += "on"
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
step(src, get_dir(M, src))
|
||||
|
||||
/obj/machinery/power/emitter/process()
|
||||
if(stat & (BROKEN))
|
||||
if(machine_stat & (BROKEN))
|
||||
return
|
||||
if(state != EMITTER_WELDED || (!powernet && active_power_usage))
|
||||
active = FALSE
|
||||
|
||||
@@ -133,10 +133,10 @@
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/power_change()
|
||||
. = ..()
|
||||
if(stat & NOPOWER)
|
||||
if(machine_stat & NOPOWER)
|
||||
active = FALSE
|
||||
use_power = NO_POWER_USE
|
||||
else if(!stat && construction_state == PA_CONSTRUCTION_COMPLETE)
|
||||
else if(!machine_stat && construction_state == PA_CONSTRUCTION_COMPLETE)
|
||||
use_power = IDLE_POWER_USE
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/process()
|
||||
@@ -232,7 +232,7 @@
|
||||
if(construction_state != PA_CONSTRUCTION_COMPLETE)
|
||||
return
|
||||
|
||||
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
|
||||
if((get_dist(src, user) > 1) || (machine_stat & (BROKEN|NOPOWER)))
|
||||
if(!issilicon(user))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=pacontrol")
|
||||
|
||||
Reference in New Issue
Block a user