Add local APC cache to /area (#61655)

About The Pull Request

for(var/obj/machinery/power/apc/APC in GLOB.apcs_list) in get_apc makes chuck norris shed a tear
Why It's Good For The Game

tears are bad
Changelog

cl
code: /area now retains a local reference to the APC in the area, if any
/cl
This commit is contained in:
esainane
2021-10-02 14:31:09 +13:00
committed by GitHub
parent c7b9ff520f
commit 30da0af679
8 changed files with 50 additions and 51 deletions
@@ -44,7 +44,7 @@
var/area/A = get_area(computer) //if the computer isn't directly connected to a wire, attempt to find the APC powering it to pull it's powernet instead
if(!A)
return
local_apc = A.get_apc()
local_apc = A.apc
if(!local_apc)
return
if(!local_apc.terminal) //this really shouldn't happen without badminnery.