From dd0ad179b573b4bd97e73d17747e7f4448f41ac0 Mon Sep 17 00:00:00 2001 From: Anewbe Date: Fri, 22 Apr 2016 17:30:36 -0500 Subject: [PATCH] Fixes Taj/Unathi being unable to eat mice. --- code/modules/mob/mob_grab_specials.dm | 6 +++--- code/modules/mob/mob_helpers.dm | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm index a5c45c79fb..63aabf3d2b 100644 --- a/code/modules/mob/mob_grab_specials.dm +++ b/code/modules/mob/mob_grab_specials.dm @@ -140,14 +140,14 @@ /obj/item/weapon/grab/proc/devour(mob/target, mob/user) var/can_eat - if((FAT in user.mutations) && issmall(target)) + if((FAT in user.mutations) && ismini(target)) can_eat = 1 else var/mob/living/carbon/human/H = user if(istype(H) && H.species.gluttonous) if(H.species.gluttonous == 2) can_eat = 2 - else if((H.mob_size > target.mob_size) && !ishuman(target) && iscarbon(target)) + else if((H.mob_size > target.mob_size) && !ishuman(target) && ismini(target)) can_eat = 1 if(can_eat) @@ -156,7 +156,7 @@ if(can_eat == 2) if(!do_mob(user, target)||!do_after(user, 30)) return else - if(!do_mob(user, target)||!do_after(user, 100)) return + if(!do_mob(user, target)||!do_after(user, 70)) return user.visible_message("[user] devours [target]!") target.loc = user attacker.stomach_contents.Add(target) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 876257be91..e0500ff3cf 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -5,6 +5,21 @@ return L.mob_size <= MOB_SMALL return 0 + +/proc/istiny(A) + if(A && istype(A, /mob/living)) + var/mob/living/L = A + return L.mob_size <= MOB_TINY + return 0 + + +/proc/ismini(A) + if(A && istype(A, /mob/living)) + var/mob/living/L = A + return L.mob_size <= MOB_MINISCULE + return 0 + + // If they are 100% robotic, they count as synthetic. /mob/living/carbon/human/isSynthetic() if(isnull(full_prosthetic))