Unify monster-consumes-object

This code was in three different places; pet eating,
monster eating metal, and monster eating other objects.

Other than very minor changes (eg. rustproofing completely
protects pets from bad effects, rustproof items are no longer
giving apport, and monsters eating corpses are healed), it
should behave the same as before... But I haven't exhaustively
gone through every iteration.
This commit is contained in:
Pasi Kallinen
2023-01-21 10:05:44 +02:00
parent f607a775a8
commit b859288f5c
3 changed files with 88 additions and 165 deletions

View File

@@ -621,6 +621,7 @@ extern int dog_nutrition(struct monst *, struct obj *);
extern int dog_eat(struct monst *, struct obj *, coordxy, coordxy, boolean);
extern int dog_move(struct monst *, int);
extern void finish_meating(struct monst *);
extern void quickmimic(struct monst *);
/* ### dokick.c ### */
@@ -1542,6 +1543,7 @@ extern int minliquid(struct monst *);
extern boolean movemon_singlemon(struct monst *);
extern int movemon(void);
extern void meatbox(struct monst *, struct obj *);
extern void m_consume_obj(struct monst *, struct obj *);
extern int meatmetal(struct monst *);
extern int meatobj(struct monst *);
extern int meatcorpse(struct monst *);