Consolidates some /Destroy()s to make them properly delete (#17046)

* The mob/living/Destroy() consolidation

* The mob/Destroy() consolidation

* The /mob/living/carbon/human consolidation

* The datum/Destroy() Consolidation

* The /atom/movable/Destroy() Consolidation

* for human
This commit is contained in:
Cameron Lennox
2025-02-14 03:06:25 +01:00
committed by GitHub
parent 900d0144a7
commit b1fc0d4c70
19 changed files with 47 additions and 84 deletions
+2
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
-4
View File
@@ -10,7 +10,3 @@
name = "Destroyed"
*/
//Deprecated in favor of Comsigs
/datum/Destroy()
SEND_SIGNAL(src,COMSIG_OBSERVER_DESTROYED)
. = ..()
-11
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.