mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Mob atom movable destroy cleanup (#18769)
* Atomization * sdaf --------- Co-authored-by: FluffyGhost <FluffyGhost>
This commit is contained in:
co-authored by
FluffyGhost <FluffyGhost>
parent
613967e2b9
commit
f3c456d06a
@@ -321,6 +321,7 @@ var/list/preferences_datums = list()
|
||||
var/obj/screen/S = char_render_holders[index]
|
||||
client?.screen -= S
|
||||
qdel(S)
|
||||
QDEL_LIST_ASSOC_VAL(char_render_holders)
|
||||
char_render_holders = null
|
||||
|
||||
/datum/preferences/proc/process_link(mob/user, list/href_list)
|
||||
@@ -336,10 +337,6 @@ var/list/preferences_datums = list()
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The forum URL is not set in the server configuration.</span>")
|
||||
return
|
||||
else if(href_list["close"])
|
||||
// User closed preferences window, cleanup anything we need to.
|
||||
clear_character_previews()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/datum/preferences/Topic(href, list/href_list)
|
||||
@@ -375,8 +372,12 @@ var/list/preferences_datums = list()
|
||||
if (alert(usr, "You will be unable to re-create a character with the same name! Are you sure you want to permanently [real_name]? The slot can not be restored.", "Permanently Delete Character", "No", "Yes") == "Yes")
|
||||
if(alert(usr, "Are you sure you want to PERMANENTLY delete your character?","Confirm Permanent Deletion","Yes","No") == "Yes")
|
||||
delete_character_sql(usr.client)
|
||||
else if(href_list["close"])
|
||||
// User closed preferences window, cleanup anything we need to.
|
||||
clear_character_previews()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return
|
||||
|
||||
ShowChoices(usr)
|
||||
return 1
|
||||
|
||||
@@ -185,4 +185,3 @@
|
||||
/mob/living/carbon/human/Destroy()
|
||||
ghost_spawner = null
|
||||
. = ..()
|
||||
GC_TEMPORARY_HARDDEL
|
||||
|
||||
@@ -127,11 +127,20 @@
|
||||
QDEL_NULL(l_store)
|
||||
QDEL_NULL(s_store)
|
||||
QDEL_NULL(wear_suit)
|
||||
QDEL_NULL(wear_mask)
|
||||
// Do this last so the mob's stuff doesn't drop on del.
|
||||
QDEL_NULL(w_uniform)
|
||||
|
||||
//Yes this is shit, but since someone had the brillant mind to use images for this, we must suffer
|
||||
if(length(hud_list))
|
||||
for(var/image/hud_overlay/an_hud_overlay in hud_list)
|
||||
if(an_hud_overlay.owner)
|
||||
an_hud_overlay.owner.client?.images -= an_hud_overlay
|
||||
an_hud_overlay.owner = null
|
||||
qdel(an_hud_overlay)
|
||||
hud_list = null
|
||||
|
||||
. = ..()
|
||||
GC_TEMPORARY_HARDDEL
|
||||
|
||||
/mob/living/carbon/human/can_devour(atom/movable/victim, var/silent = FALSE)
|
||||
if(!should_have_organ(BP_STOMACH))
|
||||
@@ -1464,10 +1473,9 @@
|
||||
maxHealth = species.total_health
|
||||
health = maxHealth
|
||||
|
||||
spawn(0)
|
||||
regenerate_icons()
|
||||
if (vessel)
|
||||
restore_blood()
|
||||
regenerate_icons()
|
||||
if (vessel)
|
||||
restore_blood()
|
||||
|
||||
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.
|
||||
if(client && client.screen)
|
||||
|
||||
@@ -926,8 +926,6 @@ default behaviour is:
|
||||
for(var/a in auras)
|
||||
remove_aura(a)
|
||||
|
||||
QDEL_NULL(ability_master)
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/proc/nervous_system_failure()
|
||||
|
||||
@@ -77,6 +77,9 @@
|
||||
QDEL_NULL(common_radio)
|
||||
for(var/datum/alarm_handler/AH in SSalarm.all_handlers)
|
||||
AH.unregister_alarm(src)
|
||||
|
||||
QDEL_LIST_ASSOC_VAL(hud_list)
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/proc/init_id()
|
||||
|
||||
+11
-4
@@ -3,25 +3,32 @@
|
||||
#define FULLY_BUCKLED 2
|
||||
|
||||
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
|
||||
MOB_STOP_THINKING(src)
|
||||
|
||||
GLOB.mob_list -= src
|
||||
GLOB.dead_mob_list -= src
|
||||
GLOB.living_mob_list -= src
|
||||
unset_machine()
|
||||
QDEL_NULL(hud_used)
|
||||
lose_hearing_sensitivity()
|
||||
|
||||
QDEL_LIST(spell_masters)
|
||||
remove_screen_obj_references()
|
||||
|
||||
if(client)
|
||||
for(var/obj/screen/movable/spell_master/spell_master in spell_masters)
|
||||
qdel(spell_master)
|
||||
remove_screen_obj_references()
|
||||
for(var/atom/movable/AM in client.screen)
|
||||
qdel(AM)
|
||||
client.screen = list()
|
||||
|
||||
if (mind)
|
||||
mind.handle_mob_deletion(src)
|
||||
|
||||
for(var/infection in viruses)
|
||||
qdel(infection)
|
||||
|
||||
for(var/cc in client_colors)
|
||||
qdel(cc)
|
||||
|
||||
client_colors = null
|
||||
viruses.Cut()
|
||||
item_verbs = null
|
||||
@@ -41,7 +48,7 @@
|
||||
var/atom/movable/AM = src.loc
|
||||
LAZYREMOVE(AM.contained_mobs, src)
|
||||
|
||||
MOB_STOP_THINKING(src)
|
||||
QDEL_NULL(ability_master)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
/atom/movable/proc/stop_orbit()
|
||||
SpinAnimation(0,0)
|
||||
qdel(orbiting)
|
||||
QDEL_NULL(orbiting)
|
||||
|
||||
/atom/movable/Destroy(force = FALSE)
|
||||
. = ..()
|
||||
|
||||
@@ -12,7 +12,6 @@ var/list/dream_entries = list()
|
||||
srom_pulling = null
|
||||
bg = null //Just to be sure.
|
||||
. = ..()
|
||||
GC_TEMPORARY_HARDDEL
|
||||
|
||||
/mob/living/carbon/human/proc/handle_shared_dreaming(var/force_wakeup = FALSE)
|
||||
// If they're an Unconsious person with the abillity to do Skrellepathy.
|
||||
|
||||
Reference in New Issue
Block a user