Reimplements old Unathi devour with some miscellaneous improvements. (#8072)

Unathi now can no longer eat items, they can no longer swallow mobs whole, and instead they now bite chunks out of mobs instead.

Also, dionae no longer delete mobs inside them when they split.
This commit is contained in:
Matt Atlas
2020-01-27 20:29:13 +01:00
committed by GitHub
parent b84731fe0a
commit 6ac723d54c
8 changed files with 261 additions and 37 deletions
+6 -1
View File
@@ -13,6 +13,9 @@
/obj/item/organ/internal/stomach/Destroy()
QDEL_NULL(ingested)
for(var/mob/M in contents)
if(M.stat != DEAD)
M.forceMove(owner.loc)
. = ..()
/obj/item/organ/internal/stomach/Initialize()
@@ -50,6 +53,8 @@
/obj/item/organ/internal/stomach/proc/is_full(var/atom/movable/food)
var/total = Floor(ingested.total_volume / 10)
if(species.gluttonous & GLUT_MESSY)
return FALSE //Don't need to check if the stomach is full if we're not using the contents.
for(var/a in contents + food)
if(ismob(a))
var/mob/M = a
@@ -68,7 +73,7 @@
var/mob/living/L = food
if((species.gluttonous & GLUT_TINY) && (L.mob_size <= MOB_TINY) && !ishuman(food)) // Anything MOB_TINY or smaller
return DEVOUR_SLOW
else if((species.gluttonous & GLUT_SMALLER) && owner.mob_size > L.mob_size) // Anything we're larger than
else if((species.gluttonous & (GLUT_SMALLER|GLUT_MESSY)) && owner.mob_size > L.mob_size) // Anything we're larger than
return DEVOUR_SLOW
else if(species.gluttonous & GLUT_ANYTHING) // Eat anything ever
return DEVOUR_FAST