From 07740f09220d9c1b705002eb3e605fd98a5b70d8 Mon Sep 17 00:00:00 2001
From: denghis1 <63977635+denghis1@users.noreply.github.com>
Date: Tue, 30 Jun 2020 22:00:12 +0200
Subject: [PATCH 1/2] 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.
---
code/modules/mob/living/simple_animal/hostile/headcrab.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
index ced4a61d8c5..5dd0dbdaa9d 100644
--- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm
+++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
@@ -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("[src] consumes [target] whole!")
+ visible_message("[src] consumes [K.name] whole!")
if(health < maxHealth)
health += 10
qdel(K)
From c1cfa53c0a880a33577f0904a8f19a4090fac4bf Mon Sep 17 00:00:00 2001
From: denghis1 <63977635+denghis1@users.noreply.github.com>
Date: Tue, 30 Jun 2020 22:28:50 +0200
Subject: [PATCH 2/2] Changes the syntax as requested by farie82
Good to have the code following proper standards
---
code/modules/mob/living/simple_animal/hostile/headcrab.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
index 5dd0dbdaa9d..08eb7128055 100644
--- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm
+++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
@@ -25,7 +25,7 @@
var/list/human_overlays = list()
/mob/living/simple_animal/hostile/headcrab/Life(seconds, times_fired)
- if(..() && src.stat != DEAD)
+ if(..() && !stat)
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("[src] consumes [K.name] whole!")
+ visible_message("[src] consumes [K] whole!")
if(health < maxHealth)
health += 10
qdel(K)