makes APCs gc and fixes an APC destroy issue (#20478)

* makes APCs gc and fixes an APC destroy issue

* Update code/modules/power/apc/apc.dm

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
GDN
2023-03-08 01:00:20 -06:00
committed by GitHub
parent 2424969e34
commit d0898bb256
+3 -2
View File
@@ -159,7 +159,7 @@
set_pixel_offsets_from_dir(24, -24, 24, -24)
apc_area = get_area(src)
apc_area.apc |= src
apc_area.apc += src
opened = APC_OPENED
operating = FALSE
name = "[apc_area.name] APC"
@@ -174,7 +174,7 @@
machine_powernet.set_power_channel(PW_CHANNEL_LIGHTING, FALSE)
machine_powernet.set_power_channel(PW_CHANNEL_EQUIPMENT, FALSE)
machine_powernet.set_power_channel(PW_CHANNEL_LIGHTING, FALSE)
machine_powernet.set_power_channel(PW_CHANNEL_ENVIRONMENT, FALSE)
machine_powernet.power_change()
if(occupier)
malfvacate(1)
@@ -183,6 +183,7 @@
if(terminal)
disconnect_terminal()
machine_powernet.powernet_apc = null
apc_area.apc -= src
return ..()