pets eating containers

Apply the patch from entrez that makes pet gelatinous cubes who eat
containers engulf rather than digest the contents, like non-tame
g.cubes.  Unlike the latter, tame ones will immediately drop the
stuff they just engulfed and might subsequently eat it all anyway.
This commit is contained in:
PatR
2022-08-18 01:09:52 -07:00
parent 10101cf1da
commit 2108abd30d
4 changed files with 44 additions and 14 deletions

View File

@@ -306,6 +306,9 @@ dog_eat(struct monst *mtmp,
Strcpy(objnambuf, xname(obj));
iflags.suppress_price--;
}
/* some monsters that eat items could eat a container with contents */
if (Has_contents(obj))
meatbox(mtmp, obj);
/* It's a reward if it's DOGFOOD and the player dropped/threw it.
We know the player had it if invlet is set. -dlc */
if (dogfood(mtmp, obj) == DOGFOOD && obj->invlet)