mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Prevents a forced qdel from fucking with things that expect more then one arg from Detach() (#59303)
This commit is contained in:
@@ -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, ...)
|
||||
|
||||
Reference in New Issue
Block a user