push
This commit is contained in:
@@ -71,13 +71,13 @@
|
||||
set_light(cpu?.enabled ? light_strength : 0)
|
||||
|
||||
/obj/machinery/modular_computer/update_icon_state()
|
||||
icon_state = (cpu?.enabled || (!(stat & NOPOWER) && cpu?.use_power())) ? icon_state_powered : icon_state_unpowered
|
||||
icon_state = (cpu?.enabled || (!(machine_stat & NOPOWER) && cpu?.use_power())) ? icon_state_powered : icon_state_unpowered
|
||||
return ..()
|
||||
|
||||
/obj/machinery/modular_computer/update_overlays()
|
||||
. = ..()
|
||||
if(!cpu?.enabled)
|
||||
if (!(stat & NOPOWER) && (cpu?.use_power()))
|
||||
if (!(machine_stat & NOPOWER) && (cpu?.use_power()))
|
||||
. += screen_icon_screensaver
|
||||
else
|
||||
. += cpu.active_program?.program_icon_state || screen_icon_state_menu
|
||||
@@ -117,13 +117,13 @@
|
||||
visible_message(span_danger("\The [src]'s screen flickers [battery_module ? "\"BATTERY [malfunction ? "MALFUNCTION" : "CRITICAL"]\"" : "\"EXTERNAL POWER LOSS\""] warning as it shuts down unexpectedly."))
|
||||
if(cpu)
|
||||
cpu.shutdown_computer(0)
|
||||
set_machine_stat(stat | NOPOWER)
|
||||
set_machine_stat(machine_stat | NOPOWER)
|
||||
update_appearance()
|
||||
|
||||
// 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?.use_power()) // If MC_CPU still has a power source, PC wouldn't go offline.
|
||||
set_machine_stat(stat & ~NOPOWER)
|
||||
set_machine_stat(machine_stat & ~NOPOWER)
|
||||
update_appearance()
|
||||
return
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user