mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
[MIRROR] Fixes a hard del with island_brawl spawners (#29286)
* Fixes a hard del with island_brawl spawners (#85684) ## About The Pull Request  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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user