Fixed headcrab Bug eating while being dead. Fixed name while eating

There was a bug with headcrabs eating while being dead.

Testing uncovered that headcrabs sometimes said the wrong name while consuming simple mobs, this has also been fixed.
This commit is contained in:
denghis1
2020-06-30 22:00:12 +02:00
parent 34d5c2223f
commit 07740f0922
@@ -25,7 +25,7 @@
var/list/human_overlays = list()
/mob/living/simple_animal/hostile/headcrab/Life(seconds, times_fired)
if(..())
if(..() && src.stat != DEAD)
if(!is_zombie && isturf(src.loc))
for(var/mob/living/carbon/human/H in oview(src, 1)) //Only for corpse right next to/on same tile
if(H.stat == DEAD || (!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD))
@@ -35,7 +35,7 @@
if(cycles >= 4)
for(var/mob/living/simple_animal/K in oview(src, 1)) //Only for corpse right next to/on same tile
if(K.stat == DEAD || (!K.check_death_method() && K.health <= HEALTH_THRESHOLD_DEAD))
visible_message("<span class='danger'>[src] consumes [target] whole!</span>")
visible_message("<span class='danger'>[src] consumes [K.name] whole!</span>")
if(health < maxHealth)
health += 10
qdel(K)