From ee3f4c3d5334c3d5689795d4e6caaf29d88bd5db Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:51:40 +0200 Subject: [PATCH] [MIRROR] Fixes a hard del with island_brawl spawners (#29286) * Fixes a hard del with island_brawl spawners (#85684) ## About The Pull Request ![yN86RRrD0h](https://github.com/user-attachments/assets/2aaa23c8-1fcb-4a40-ad54-c71306a2f430) Tin, just aims to fix this hard del by releasing the refs when the spawners get qdeleted. ## Why It's Good For The Game Fixes a hard del---also, there were some issues with this domain not clearing itself properly under certain cases and this may resolve that. ## Changelog Nothing player facing * Fixes a hard del with island_brawl spawners --------- Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --- .../bitrunning/virtual_domain/domains/island_brawl.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/modules/bitrunning/virtual_domain/domains/island_brawl.dm b/code/modules/bitrunning/virtual_domain/domains/island_brawl.dm index b745a4746aa..84eb53e026a 100644 --- a/code/modules/bitrunning/virtual_domain/domains/island_brawl.dm +++ b/code/modules/bitrunning/virtual_domain/domains/island_brawl.dm @@ -21,9 +21,17 @@ for(var/obj/effect/mob_spawn/ghost_role/human/virtual_domain/islander/spawner in created_atoms) custom_spawns += spawner + RegisterSignal(spawner, COMSIG_QDELETING, PROC_REF(on_spawner_qdeleted)) RegisterSignals(spawner, list(COMSIG_GHOSTROLE_SPAWNED, COMSIG_BITRUNNER_SPAWNED), PROC_REF(on_spawn)) +/datum/lazy_template/virtual_domain/island_brawl/proc/on_spawner_qdeleted(obj/effect/mob_spawn/ghost_role/human/virtual_domain/islander/source) + SIGNAL_HANDLER + + custom_spawns -= source + UnregisterSignal(source, COMSIG_QDELETING) + + /// Someone has spawned in, so we check for their death /datum/lazy_template/virtual_domain/island_brawl/proc/on_spawn(datum/source, mob/living/spawned_mob) SIGNAL_HANDLER