[MIRROR] Refactors machine_stat and is_processing() to process on demand (#515)

* Refactors machine_stat and is_processing() to process on demand (#53150)

* Refactors machine_stat and is_processing() to process on demand

* Fixes master (#53193)

* fixes master, damn it me/mothblocks

* fuck again

* ANOTHER ONE

* Fixes master

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-08-26 01:21:26 +02:00
committed by GitHub
co-authored by Rohesie LemonInTheDark
parent c886d68a6b
commit 63a0ca874c
62 changed files with 272 additions and 165 deletions
@@ -100,13 +100,13 @@
visible_message("<span class='danger'>\The [src]'s screen flickers [battery_module ? "\"BATTERY [malfunction ? "MALFUNCTION" : "CRITICAL"]\"" : "\"EXTERNAL POWER LOSS\""] warning as it shuts down unexpectedly.</span>")
if(cpu)
cpu.shutdown_computer(0)
machine_stat |= NOPOWER
set_machine_stat(machine_stat | NOPOWER)
update_icon()
// Modular computers can have battery in them, we handle power in previous proc, so prevent this from messing it up for us.
/obj/machinery/modular_computer/power_change()
if(cpu && cpu.use_power()) // If MC_CPU still has a power source, PC wouldn't go offline.
machine_stat &= ~NOPOWER
set_machine_stat(machine_stat & ~NOPOWER)
update_icon()
return
. = ..()