[MIRROR] Add local APC cache to /area [MDB IGNORE] (#8550)

* 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

* Add local APC cache to /area

Co-authored-by: esainane <esainane+github@gmail.com>
This commit is contained in:
SkyratBot
2021-10-02 03:34:42 +02:00
committed by GitHub
parent 6a8b9e8d0f
commit 1231c6fa58
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.