diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index ae931484524..d359744320c 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1367,6 +1367,8 @@ cell.use(20) spawn(0) for(var/obj/machinery/light/L in area) + if(!L.isfunctional()) + continue if(prob(chance)) L.on = 1 L.broken() diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 18a760f5f1d..1c2a0397b62 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -581,6 +581,9 @@ sleep(1) qdel(src) +/obj/machinery/light/proc/isfunctional() + return status == LIGHT_OK + // the light item // can be tube or bulb subtypes // will fit into empty /obj/machinery/light of the corresponding type