mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
[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:
co-authored by
Rohesie
LemonInTheDark
parent
c886d68a6b
commit
63a0ca874c
@@ -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
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user