mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fixes simple_animals not deleting properly (#24618)
* Fixes simple_animals not deleting properly * Merging both /mob/living/New()
This commit is contained in:
@@ -18,6 +18,9 @@
|
|||||||
|
|
||||||
immune_system = new (src)
|
immune_system = new (src)
|
||||||
|
|
||||||
|
on_resist = new(owner = src)
|
||||||
|
on_life = new(owner = src)
|
||||||
|
|
||||||
/mob/living/Destroy()
|
/mob/living/Destroy()
|
||||||
for(var/mob/living/silicon/robot/mommi/MoMMI in player_list)
|
for(var/mob/living/silicon/robot/mommi/MoMMI in player_list)
|
||||||
for(var/image/I in static_overlays)
|
for(var/image/I in static_overlays)
|
||||||
@@ -42,6 +45,14 @@
|
|||||||
qdel(immune_system)
|
qdel(immune_system)
|
||||||
immune_system = null
|
immune_system = null
|
||||||
|
|
||||||
|
if(on_resist)
|
||||||
|
qdel(on_resist)
|
||||||
|
on_resist = null
|
||||||
|
|
||||||
|
if(on_life)
|
||||||
|
qdel(on_life)
|
||||||
|
on_life = null
|
||||||
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/mob/living/examine(var/mob/user, var/size = "", var/show_name = TRUE, var/show_icon = TRUE) //Show the mob's size and whether it's been butchered
|
/mob/living/examine(var/mob/user, var/size = "", var/show_name = TRUE, var/show_icon = TRUE) //Show the mob's size and whether it's been butchered
|
||||||
@@ -794,18 +805,6 @@ Thanks.
|
|||||||
/mob/living
|
/mob/living
|
||||||
var/event/on_resist
|
var/event/on_resist
|
||||||
|
|
||||||
/mob/living/New()
|
|
||||||
. = ..()
|
|
||||||
on_resist = new(owner = src)
|
|
||||||
on_life = new(owner = src)
|
|
||||||
|
|
||||||
/mob/living/Destroy()
|
|
||||||
. = ..()
|
|
||||||
qdel(on_resist)
|
|
||||||
on_resist = null
|
|
||||||
qdel(on_life)
|
|
||||||
on_life = null
|
|
||||||
|
|
||||||
/mob/living/verb/resist()
|
/mob/living/verb/resist()
|
||||||
set name = "Resist"
|
set name = "Resist"
|
||||||
set category = "IC"
|
set category = "IC"
|
||||||
|
|||||||
@@ -520,8 +520,6 @@ var/global/list/animal_count = list() //Stores types, and amount of animals of t
|
|||||||
emote("deathgasp", message = TRUE)
|
emote("deathgasp", message = TRUE)
|
||||||
|
|
||||||
health = 0 // so /mob/living/simple_animal/Life() doesn't magically revive them
|
health = 0 // so /mob/living/simple_animal/Life() doesn't magically revive them
|
||||||
living_mob_list -= src
|
|
||||||
dead_mob_list += src
|
|
||||||
stat = DEAD
|
stat = DEAD
|
||||||
if(icon_dying && !gibbed)
|
if(icon_dying && !gibbed)
|
||||||
do_flick(src, icon_dying, icon_dying_time)
|
do_flick(src, icon_dying, icon_dying_time)
|
||||||
@@ -536,8 +534,6 @@ var/global/list/animal_count = list() //Stores types, and amount of animals of t
|
|||||||
for(var/butchering_type in L)
|
for(var/butchering_type in L)
|
||||||
src.butchering_drops += new butchering_type
|
src.butchering_drops += new butchering_type
|
||||||
|
|
||||||
verbs += /mob/living/proc/butcher
|
|
||||||
|
|
||||||
..(gibbed)
|
..(gibbed)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user