mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[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:
committed by
GitHub
parent
f655daef72
commit
42463a356a
@@ -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//
|
||||
///////////////////////////////////////
|
||||
|
||||
@@ -97,7 +97,3 @@ SUBSYSTEM_DEF(mobs)
|
||||
/datum/controller/subsystem/mobs/critfail()
|
||||
..()
|
||||
log_recent()
|
||||
|
||||
/mob/Destroy()
|
||||
. = ..()
|
||||
SSmobs.currentrun -= src
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,7 +10,3 @@
|
||||
name = "Destroyed"
|
||||
*/
|
||||
//Deprecated in favor of Comsigs
|
||||
|
||||
/datum/Destroy()
|
||||
SEND_SIGNAL(src,COMSIG_OBSERVER_DESTROYED)
|
||||
. = ..()
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -64,6 +64,9 @@
|
||||
UnregisterSignal(em_block, COMSIG_PARENT_QDELETING)
|
||||
QDEL_NULL(em_block)
|
||||
. = ..()
|
||||
|
||||
unbuckle_all_mobs()
|
||||
|
||||
for(var/atom/movable/AM in contents)
|
||||
qdel(AM)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -583,12 +583,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
|
||||
|
||||
@@ -22,10 +22,6 @@
|
||||
..()
|
||||
cultnet.updateVisibility(src, 0)
|
||||
|
||||
/mob/living/Destroy()
|
||||
cultnet.updateVisibility(src, 0)
|
||||
return ..()
|
||||
|
||||
/mob/living/rejuvenate()
|
||||
var/was_dead = stat == DEAD
|
||||
..()
|
||||
|
||||
@@ -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()
|
||||
. = ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -76,13 +76,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)
|
||||
|
||||
@@ -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
|
||||
@@ -74,7 +94,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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
glass_center_of_mass_x = 16
|
||||
glass_center_of_mass_y = 7
|
||||
|
||||
/datum/reagent/toxin/bluetrain
|
||||
/datum/reagent/ethanol/bluetrain
|
||||
glass_icon_state = "bluetrain"
|
||||
glass_icon_file = 'modular_chomp/icons/obj/drinks.dmi'
|
||||
glass_center_of_mass_x = 16
|
||||
@@ -153,7 +153,7 @@
|
||||
glass_icon_state = "manlydorfglass"
|
||||
glass_icon_file = 'modular_chomp/icons/obj/drinks.dmi'
|
||||
|
||||
/datum/reagent/ethanol/tequilla_sunrise
|
||||
/datum/reagent/ethanol/tequila_sunrise
|
||||
glass_icon_state = "tequilasunriseglass"
|
||||
glass_icon_file = 'modular_chomp/icons/obj/drinks.dmi'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user