Refactored deletion observables to use the COMSIG_QDELETING signal (#20121)

Refactored deletion observables to use the COMSIG_QDELETING signal
instead, removed the observable.
This commit is contained in:
Fluffy
2024-11-04 21:51:18 +00:00
committed by GitHub
parent ce0f722f18
commit 513facdb0d
25 changed files with 120 additions and 56 deletions
@@ -33,7 +33,7 @@
listeners = list()
listener_status = list()
GLOB.destroyed_event.register(source, src, /datum/proc/qdel_self)
RegisterSignal(source, COMSIG_QDELETING, TYPE_PROC_REF(/datum, qdel_self))
player.subscribe(src)
@@ -52,6 +52,6 @@
/datum/sound_token/instrument/Destroy()
. = ..()
GLOB.destroyed_event.unregister(source, src, /datum/proc/qdel_self)
UnregisterSignal(source, COMSIG_QDELETING)
player.unsubscribe(src)
player = null