update_appearance
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user