Prevents a forced qdel from fucking with things that expect more then one arg from Detach() (#59303)

This commit is contained in:
LemonInTheDark
2021-05-25 23:54:49 -07:00
committed by GitHub
parent e6a050064d
commit 7553355ecd
+5 -1
View File
@@ -23,7 +23,11 @@
return ELEMENT_INCOMPATIBLE
SEND_SIGNAL(target, COMSIG_ELEMENT_ATTACH, src)
if(element_flags & ELEMENT_DETACH)
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/Detach, override = TRUE)
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/OnTargetDelete, override = TRUE)
/datum/element/proc/OnTargetDelete(datum/source, force)
SIGNAL_HANDLER
Detach(source)
/// Deactivates the functionality defines by the element on the given datum
/datum/element/proc/Detach(datum/source, ...)