update_appearance

This commit is contained in:
Artur
2021-07-06 21:50:53 +03:00
parent d185c5a3e9
commit cdbd585f4d
16 changed files with 134 additions and 40 deletions
+16 -8
View File
@@ -104,15 +104,23 @@
/obj/machinery/proc/removeStaticPower(value, powerchannel)
addStaticPower(-value, powerchannel)
/obj/machinery/proc/power_change() // called whenever the power settings of the containing area change
// by default, check equipment channel & set flag
// can override if needed
if(powered(power_channel))
stat &= ~NOPOWER
else
/obj/machinery/proc/power_change()
//SIGNAL_HANDLER
//SHOULD_CALL_PARENT(TRUE)
stat |= NOPOWER
return
if(stat & BROKEN)
return
if(powered(power_channel))
if(stat & NOPOWER)
SEND_SIGNAL(src, COMSIG_MACHINERY_POWER_RESTORED)
. = TRUE
set_machine_stat(stat & ~NOPOWER)
else
if(!(stat & NOPOWER))
SEND_SIGNAL(src, COMSIG_MACHINERY_POWER_LOST)
. = TRUE
set_machine_stat(stat | NOPOWER)
update_appearance()
// connect the machine to a powernet if a node cable is present on the turf
/obj/machinery/power/proc/connect_to_network()