From 86e06b1b293f7ee2a67f783806c3c66b7a7220ab Mon Sep 17 00:00:00 2001 From: Bloop <13398309+vinylspiders@users.noreply.github.com> Date: Tue, 21 Jan 2025 21:07:12 -0500 Subject: [PATCH] Fixes an armrest related hard del (#89139) ## About The Pull Request Another spurious CI runtime that keeps coming up all the time and is annoying me. I believe it's occurring due to the chair not being initialized before a `mob_buckler` mapping helper tries to buckle mobs to it. So I moved their code to lateload to hopefully ensure that doesn't happen, as well as an additional safety measure in the armchair code itself. edit: confirmed that this does indeed fix it, as I have it merged downstream preemptively due to it being such a blocking nuisance ![image](https://github.com/user-attachments/assets/508e3f58-08ee-4e54-98a2-8a655ce85530) Caused by ## Why It's Good For The Game Less CI failures ## Changelog N/A --- code/modules/mapping/mapping_helpers.dm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index d04e6e0afd1..da7d288d161 100644 --- a/code/modules/mapping/mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers.dm @@ -1373,6 +1373,13 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_atoms_ontop) /obj/effect/mapping_helpers/mob_buckler/Initialize(mapload) . = ..() + if(!mapload) + log_mapping("[src] spawned outside of mapload!") + return INITIALIZE_HINT_QDEL + + return INITIALIZE_HINT_LATELOAD + +/obj/effect/mapping_helpers/mob_buckler/LateInitialize() var/atom/movable/buckle_to var/list/mobs = list() for(var/atom/movable/possible_buckle as anything in loc) @@ -1385,12 +1392,13 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_atoms_ontop) if(isnull(buckle_to)) log_mapping("[type] at [x] [y] [z] did not find anything to buckle to") - return INITIALIZE_HINT_QDEL + qdel(src) + return for(var/mob/living/mob as anything in mobs) buckle_to.buckle_mob(mob, force = force_buckle) - return INITIALIZE_HINT_QDEL + qdel(src) ///Basic mob flag helpers for things like deleting on death. /obj/effect/mapping_helpers/basic_mob_flags