diff --git a/code/_onclick/hud/ability_screen_objects.dm b/code/_onclick/hud/ability_screen_objects.dm index 5d304f14707..1156eff6c19 100644 --- a/code/_onclick/hud/ability_screen_objects.dm +++ b/code/_onclick/hud/ability_screen_objects.dm @@ -184,13 +184,6 @@ if(!ability_master) //VOREStation Edit: S H A D E K I N ability_master = new /obj/screen/movable/ability_master(src) - -/mob/Destroy() - ..() - if(ability_master) - QDEL_NULL(ability_master) - - ///////////ACTUAL ABILITIES//////////// //This is what you click to do things// /////////////////////////////////////// diff --git a/code/controllers/subsystems/mobs.dm b/code/controllers/subsystems/mobs.dm index 57d7838a32f..8fec502f21c 100644 --- a/code/controllers/subsystems/mobs.dm +++ b/code/controllers/subsystems/mobs.dm @@ -92,7 +92,3 @@ SUBSYSTEM_DEF(mobs) /datum/controller/subsystem/mobs/critfail() ..() log_recent() - -/mob/Destroy() - . = ..() - SSmobs.currentrun -= src diff --git a/code/controllers/subsystems/radiation.dm b/code/controllers/subsystems/radiation.dm index c52f69b33a0..624d6f4279c 100644 --- a/code/controllers/subsystems/radiation.dm +++ b/code/controllers/subsystems/radiation.dm @@ -146,7 +146,3 @@ SUBSYSTEM_DEF(radiation) return var/turf/epicentre = locate(round(world.maxx / 2), round(world.maxy / 2), source.z) flat_radiate(epicentre, power, world.maxx, respect_maint) - -/mob/living/Destroy() - . = ..() - SSradiation.listeners -= src diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 8813e074f96..d7862552073 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -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 diff --git a/code/datums/observation/destroyed.dm b/code/datums/observation/destroyed.dm index 9846eda6daf..a1c645e9f6a 100644 --- a/code/datums/observation/destroyed.dm +++ b/code/datums/observation/destroyed.dm @@ -10,7 +10,3 @@ name = "Destroyed" */ //Deprecated in favor of Comsigs - -/datum/Destroy() - SEND_SIGNAL(src,COMSIG_OBSERVER_DESTROYED) - . = ..() diff --git a/code/datums/soul_link.dm b/code/datums/soul_link.dm index 1a99d170c5b..8c7481443ff 100644 --- a/code/datums/soul_link.dm +++ b/code/datums/soul_link.dm @@ -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. diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 5e2ab6ea41b..daa473b74e7 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -62,6 +62,9 @@ UnregisterSignal(em_block, COMSIG_PARENT_QDELETING) QDEL_NULL(em_block) . = ..() + + unbuckle_all_mobs() + for(var/atom/movable/AM in contents) qdel(AM) diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 3397dc437bf..fb3a6c93e9f 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -42,9 +42,7 @@ /atom/movable/proc/has_buckled_mobs() return LAZYLEN(buckled_mobs) -/atom/movable/Destroy() - unbuckle_all_mobs() - return ..() + /atom/movable/proc/buckle_mob(mob/living/M, forced = FALSE, check_loc = TRUE) diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm index af9df3c1889..6171fe8cb6f 100644 --- a/code/modules/ai/ai_holder.dm +++ b/code/modules/ai/ai_holder.dm @@ -19,16 +19,6 @@ initialize_ai_holder() return ..() -/mob/living/Destroy() - if(ai_holder) - ai_holder.holder = null - ai_holder.UnregisterSignal(src,COMSIG_MOB_STATCHANGE) - if(ai_holder.faction_friends && ai_holder.faction_friends.len) //This list is shared amongst the faction - ai_holder.faction_friends -= src - ai_holder.faction_friends = null - QDEL_NULL(ai_holder) - return ..() - /mob/living/Login() if(!stat && ai_holder) ai_holder.manage_processing(AI_NO_PROCESS) diff --git a/code/modules/ai/say_list.dm b/code/modules/ai/say_list.dm index fb4e66651ef..3e57ada00bc 100644 --- a/code/modules/ai/say_list.dm +++ b/code/modules/ai/say_list.dm @@ -14,11 +14,6 @@ say_list = new say_list_type(src) return ..() -/mob/living/Destroy() - QDEL_NULL(say_list) - return ..() - - /datum/say_list var/list/speak = list() // Things the mob might say if it talks while idle. var/list/emote_hear = list() // Hearable emotes it might perform diff --git a/code/modules/mob/_modifiers/modifiers.dm b/code/modules/mob/_modifiers/modifiers.dm index d49ff288747..3f3908820da 100644 --- a/code/modules/mob/_modifiers/modifiers.dm +++ b/code/modules/mob/_modifiers/modifiers.dm @@ -113,10 +113,6 @@ /mob/living var/list/modifiers = list() // A list of modifier datums, which can adjust certain mob numbers. -/mob/living/Destroy() - remove_all_modifiers(TRUE) - return ..() - // Called by Life(). /mob/living/proc/handle_modifiers() if(!modifiers.len) // No work to do. diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 78e1c3ce7da..66e23dee715 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -581,12 +581,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob var/list/following_mobs = list() -/mob/Destroy() - for(var/mob/observer/dead/M in following_mobs) - M.stop_following() - following_mobs = null - return ..() - /mob/observer/dead/Destroy() visualnet.addVisibility(src, src.client) visualnet = null diff --git a/code/modules/mob/freelook/mask/update_triggers.dm b/code/modules/mob/freelook/mask/update_triggers.dm index 5ddf74de3c7..d257dfc173c 100644 --- a/code/modules/mob/freelook/mask/update_triggers.dm +++ b/code/modules/mob/freelook/mask/update_triggers.dm @@ -22,10 +22,6 @@ ..() cultnet.updateVisibility(src, 0) -/mob/living/Destroy() - cultnet.updateVisibility(src, 0) - return ..() - /mob/living/rejuvenate() var/was_dead = stat == DEAD ..() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index eb09d32b3da..62a268ed407 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -75,12 +75,17 @@ QDEL_NULL_LIST(organs) if(nif) QDEL_NULL(nif) + alt_farmanimals -= src worn_clothing.Cut() + if(stored_blob) + stored_blob.drop_l_hand() + stored_blob.drop_r_hand() + QDEL_NULL(stored_blob) if(vessel) QDEL_NULL(vessel) - return ..() + . = ..() /mob/living/carbon/human/get_status_tab_items() . = ..() diff --git a/code/modules/mob/living/carbon/human/human_vr.dm b/code/modules/mob/living/carbon/human/human_vr.dm index cfbfc387ba7..64beee3a1df 100644 --- a/code/modules/mob/living/carbon/human/human_vr.dm +++ b/code/modules/mob/living/carbon/human/human_vr.dm @@ -7,11 +7,6 @@ img.override = TRUE add_alt_appearance("animals", img, displayTo = alt_farmanimals) -/mob/living/carbon/human/Destroy() - alt_farmanimals -= src - - . = ..() - /mob/living/carbon/human/get_digestion_nutrition_modifier() return species.digestion_nutrition_modifier diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index 5624efc1481..b1f8988fdc4 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -75,13 +75,6 @@ set_light(0) return ..() -/mob/living/carbon/human/Destroy() - if(stored_blob) - stored_blob.drop_l_hand() - stored_blob.drop_r_hand() - QDEL_NULL(stored_blob) - return ..() - /mob/living/simple_mob/slime/promethean/update_misc_tabs() . = ..() if(humanform) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 3dc61437258..b99aea01f72 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -19,6 +19,26 @@ selected_image = image(icon = buildmode_hud, loc = src, icon_state = "ai_sel") /mob/living/Destroy() + SSradiation.listeners -= src + remove_all_modifiers(TRUE) + QDEL_NULL(say_list) + + 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 + + if(ai_holder) + ai_holder.holder = null + ai_holder.UnregisterSignal(src,COMSIG_MOB_STATCHANGE) + if(ai_holder.faction_friends && ai_holder.faction_friends.len) //This list is shared amongst the faction + ai_holder.faction_friends -= src + ai_holder.faction_friends = null + QDEL_NULL(ai_holder) if(dsoverlay) dsoverlay.loc = null //I'll take my coat with me dsoverlay = null @@ -78,7 +98,14 @@ internal_organs -= OR qdel(OR) - return ..() + cultnet.updateVisibility(src, 0) + + if(aiming) + qdel(aiming) + aiming = null + aimed.Cut() + + . = ..() //mob verbs are faster than object verbs. See mob/verb/examine. /mob/living/verb/pulled(atom/movable/AM as mob|obj in oview(1)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index e2ef6b1c91d..bce4f40bf48 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1,4 +1,5 @@ /mob/Destroy()//This makes sure that mobs withGLOB.clients/keys are not just deleted from the game. + SSmobs.currentrun -= src mob_list -= src dead_mob_list -= src living_mob_list -= src @@ -23,12 +24,17 @@ if(pulling) stop_pulling() //TG does this on atom/movable but our stop_pulling proc is here so whatever - vore_selected = null + if(ability_master) + QDEL_NULL(ability_master) + if(vore_organs) QDEL_NULL_LIST(vore_organs) if(vorePanel) QDEL_NULL(vorePanel) + for(var/mob/observer/dead/M in following_mobs) + M.stop_following() + following_mobs = null previewing_belly = null // from code/modules/vore/eating/mob_ch.dm vore_selected = null // from code/modules/vore/eating/mob_vr focus = null diff --git a/code/modules/projectiles/targeting/targeting_mob.dm b/code/modules/projectiles/targeting/targeting_mob.dm index b6796c6ee96..7bc5c548d91 100644 --- a/code/modules/projectiles/targeting/targeting_mob.dm +++ b/code/modules/projectiles/targeting/targeting_mob.dm @@ -35,13 +35,6 @@ stop_aiming(no_message=1) ..() -/mob/living/Destroy() - if(aiming) - qdel(aiming) - aiming = null - aimed.Cut() - return ..() - /turf/Enter(var/mob/living/mover) . = ..() if(istype(mover))