From a513eefe704aea3ffc9423b4e06eddb4c39b3886 Mon Sep 17 00:00:00 2001 From: Razgriz Date: Tue, 24 Sep 2019 03:35:51 -0700 Subject: [PATCH] isEdible fix loop fix Prevents vore mobs from attempting to vore other mobs that are inedible. Without this they just got stuck in a loop trying to eat each other and deal no damage. --- code/modules/mob/living/simple_animal/simple_animal_vr.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/living/simple_animal/simple_animal_vr.dm b/code/modules/mob/living/simple_animal/simple_animal_vr.dm index ee4c462a48..6012a8dffc 100644 --- a/code/modules/mob/living/simple_animal/simple_animal_vr.dm +++ b/code/modules/mob/living/simple_animal/simple_animal_vr.dm @@ -87,6 +87,9 @@ if(vore_capacity != 0 && (vore_fullness >= vore_capacity)) // We're too full to fit them ai_log("vr/wont eat [M] because I am too full", 3) return 0 + if(!M.isEdible)//Don't eat mobs that can't be eaten. + ai_log("vr/wont eat [M] because they aren't edible", 3) + return 0 return 1 /mob/living/simple_animal/PunchTarget()