This commit is contained in:
SandPoot
2024-04-05 17:57:54 -03:00
parent bd7040a50d
commit 68fa21d602
34 changed files with 223 additions and 126 deletions
+20 -9
View File
@@ -20,27 +20,38 @@
hook_vr("mob_new",list(src))
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
// if(client)
// stack_trace("Mob with client has been deleted.")
// else if(ckey)
// stack_trace("Mob without client but with associated ckey, [ckey], has been deleted.")
unset_machine()
remove_from_mob_list()
remove_from_dead_mob_list()
remove_from_alive_mob_list()
QDEL_LIST(mob_spell_list)
QDEL_LIST(actions)
GLOB.all_clockwork_mobs -= src
// remove_from_mob_suicide_list()
focus = null
LAssailant = null
movespeed_modification = null
if(length(progressbars))
stack_trace("[src] destroyed with elements in its progressbars list.")
progressbars = null
for (var/alert in alerts)
clear_alert(alert, TRUE)
if(observers && observers.len)
for(var/M in observers)
var/mob/dead/observe = M
if(observers?.len)
for(var/mob/dead/observe as anything in observers)
observe.reset_perspective(null)
dispose_rendering()
qdel(hud_used)
for(var/cc in client_colours)
qdel(cc)
client_colours = null
ghostize()
..()
return QDEL_HINT_HARDDEL
QDEL_LIST(client_colours)
ghostize(can_reenter_corpse = FALSE) //False, since we're deleting it currently
if(mind?.current == src) //Let's just be safe yeah? This will occasionally be cleared, but not always. Can't do it with ghostize without changing behavior
mind.set_current(null)
// if(mock_client)
// mock_client.mob = null
return ..()
/mob/GenerateTag()
tag = "mob_[next_mob_id++]"