fix: fix APC behavior in unpowered areas (#25642)

* fix: make unpowered areas without APCs actually unpowered

* Update code/modules/power/powernets/local_powernet.dm

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>

---------

Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
This commit is contained in:
warriorstar-orion
2024-05-30 15:22:10 +00:00
committed by GitHub
co-authored by 1080pCat
parent 37b08619b0
commit 5a2fd048b1
5 changed files with 15 additions and 9 deletions
@@ -105,7 +105,9 @@
return FALSE
if(power_flags & PW_ALWAYS_POWERED) //if this powernet is always powered, we always return TRUE
return TRUE
if(powernet_apc?.stat & (BROKEN|MAINT)) //no working apc, no power
if(!powernet_apc)
return FALSE
if(powernet_apc.stat & (BROKEN|MAINT)) // no working apc, no power
return FALSE
switch(channel)