module things, jfc
This commit is contained in:
@@ -345,6 +345,7 @@
|
||||
else if(has_emergency_power(LIGHT_EMERGENCY_POWER_USE) && !turned_off())
|
||||
use_power = IDLE_POWER_USE
|
||||
emergency_mode = TRUE
|
||||
START_PROCESSING(SSmachines, src)
|
||||
else
|
||||
use_power = IDLE_POWER_USE
|
||||
set_light(0)
|
||||
@@ -361,7 +362,11 @@
|
||||
|
||||
|
||||
/obj/machinery/light/process()
|
||||
if(has_power() && cell)
|
||||
if (!cell)
|
||||
return PROCESS_KILL
|
||||
if(has_power())
|
||||
if (cell.charge == cell.maxcharge)
|
||||
return PROCESS_KILL
|
||||
cell.charge = min(cell.maxcharge, cell.charge + LIGHT_EMERGENCY_POWER_USE) //Recharge emergency power automatically while not using it
|
||||
if(emergency_mode && !use_emergency_power(LIGHT_EMERGENCY_POWER_USE))
|
||||
update(FALSE) //Disables emergency mode and sets the color to normal
|
||||
|
||||
Reference in New Issue
Block a user