[MIRROR] Consolidates some /Destroy()s to make them properly delete (#10171)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-02-14 22:03:28 -07:00
committed by GitHub
parent f655daef72
commit 42463a356a
20 changed files with 49 additions and 86 deletions

View File

@@ -126,6 +126,8 @@
SStgui.close_uis(src)
SEND_SIGNAL(src,COMSIG_OBSERVER_DESTROYED)
#ifdef REFERENCE_TRACKING
if(find_references_on_destroy)
return QDEL_HINT_FINDREFERENCE

View File

@@ -10,7 +10,3 @@
name = "Destroyed"
*/
//Deprecated in favor of Comsigs
/datum/Destroy()
SEND_SIGNAL(src,COMSIG_OBSERVER_DESTROYED)
. = ..()

View File

@@ -5,17 +5,6 @@
var/list/owned_soul_links // Soul links we are the owner of.
var/list/shared_soul_links // Soul links we are a/the sharer of.
/mob/living/Destroy()
for(var/datum/soul_link/S as anything in owned_soul_links)
S.owner_died(FALSE)
qdel(S) // If the owner is destroy()'d, the soullink is destroy()'d.
owned_soul_links = null
for(var/datum/soul_link/S as anything in shared_soul_links)
S.sharer_died(FALSE)
S.remove_soul_sharer(src) // If a sharer is destroy()'d, they are simply removed.
shared_soul_links = null
return ..()
// Keeps track of a Mob->Mob (potentially Player->Player) connection.
// Can be used to trigger actions on one party when events happen to another.
// Eg: shared deaths.