move airlock chamber setup out of lateinit (#29672)

* move airlock chamber setup out of lateinit

* clean up comment
This commit is contained in:
warriorstar-orion
2025-06-30 06:51:15 -04:00
committed by GitHub
parent 0e273a8c8c
commit eddaaca8d9
4 changed files with 24 additions and 22 deletions
@@ -100,13 +100,11 @@ RESTRICT_TYPE(/datum/dynamic_airlock_linker)
controller.req_access = req_access
controller.req_one_access = req_one_access
// despite airlock controllers looking this up in GLOB.airlocks in
// LateInitialize, we need to hold their hand here because *we're*
// (typically) in Initialize, so not all relevant airlocks may have been
// added to GLOB.airlocks yet.
controller.interior_doors = interior_airlocks.Copy()
controller.exterior_doors = exterior_airlocks.Copy()
controller.link_all_items()
QDEL_LIST_CONTENTS(interior_helpers)
QDEL_LIST_CONTENTS(exterior_helpers)
QDEL_LIST_CONTENTS(visited_helpers)
+6 -1
View File
@@ -23,8 +23,11 @@
/obj/effect/map_effect/dynamic_airlock/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD
/obj/effect/map_effect/dynamic_airlock/LateInitialize()
. = ..()
. = INITIALIZE_HINT_QDEL
// One helper out of all the connected ones will actually set everything up
// and qdel all the connected ones so the linker doesn't attempt to do its
// thing more than once per zone
@@ -34,6 +37,8 @@
var/datum/dynamic_airlock_linker/linker = new()
linker.build(src)
qdel(src)
/obj/effect/map_effect/dynamic_airlock/proc/collect_sibling_item(atom/A)
if(is_type_in_list(A, valid_siblings))
LAZYADD(sibling_items, A)