From 06293b0c40418d1ed70d825303fa709ef6be119a Mon Sep 17 00:00:00 2001 From: Wildkins Date: Mon, 22 Aug 2022 04:43:47 -0400 Subject: [PATCH] Fix away site APCs not updating their areas on init (#14693) --- code/modules/maps/map_template.dm | 7 +++++++ html/changelogs/johnwildkins-apcfix.yml | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 html/changelogs/johnwildkins-apcfix.yml diff --git a/code/modules/maps/map_template.dm b/code/modules/maps/map_template.dm index c94ab2fbfb2..6e23f0bda6b 100644 --- a/code/modules/maps/map_template.dm +++ b/code/modules/maps/map_template.dm @@ -91,6 +91,7 @@ var/list/obj/machinery/atmospherics/atmos_machines = list() var/list/obj/machinery/machines = list() var/list/obj/structure/cable/cables = list() + var/list/obj/machinery/power/apc/apcs = list() for(var/atom/A in atoms) if(istype(A, /turf)) @@ -103,6 +104,8 @@ machines += A if(istype(A,/obj/effect/landmark/map_load_mark)) LAZYADD(subtemplates_to_spawn, A) + if(istype(A, /obj/machinery/power/apc)) + apcs += A if(A.initialized) atoms -= A @@ -118,6 +121,10 @@ if(notsuspended) SSmachinery.wake() + for (var/i in apcs) + var/obj/machinery/power/apc/apc = i + apc.update() // map-loading areas and APCs is weird, okay + for (var/i in machines) var/obj/machinery/machine = i machine.power_change() diff --git a/html/changelogs/johnwildkins-apcfix.yml b/html/changelogs/johnwildkins-apcfix.yml new file mode 100644 index 00000000000..bbbd24f9bb7 --- /dev/null +++ b/html/changelogs/johnwildkins-apcfix.yml @@ -0,0 +1,6 @@ +author: JohnWildkins + +delete-after: True + +changes: + - bugfix: "Fix APCs on away sites + ruins not initializing their areas properly."