mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #1482 from Anewbe/devour_fix
Fixes Taj/Unathi being unable to eat mice.
This commit is contained in:
@@ -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("<span class='danger'>[user] devours [target]!</span>")
|
||||
target.loc = user
|
||||
attacker.stomach_contents.Add(target)
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user