unpaid object sanity checking

Handle items in gaps of a wall shared between adjacent shops.

Make handling of shop boundaries more explicit:  walls, the door,
and the "free spot" by the door aren't classified as 'costly' but
obj->unpaid and obj->no_charge are valid there.

Move unpaid/no_charge checking into its own routine to unclutter
objlist_sanity().

Pushing a shop-owned boulder to the free spot or doorway or gap in
wall triggers the sanity check for the time being.
This commit is contained in:
PatR
2022-11-23 16:41:12 -08:00
parent 3398b34cc7
commit e49c772f13
3 changed files with 109 additions and 49 deletions

View File

@@ -2480,6 +2480,7 @@ extern boolean same_price(struct obj *, struct obj *);
extern void shopper_financial_report(void);
extern int inhishop(struct monst *);
extern struct monst *shop_keeper(char);
extern struct monst *find_objowner(struct obj *, coordxy x, coordxy y);
extern boolean tended_shop(struct mkroom *);
extern boolean onshopbill(struct obj *, struct monst *, boolean);
extern boolean is_unpaid(struct obj *);
@@ -2518,6 +2519,7 @@ extern boolean is_fshk(struct monst *);
extern void shopdig(int);
extern void pay_for_damage(const char *, boolean);
extern boolean costly_spot(coordxy, coordxy);
extern boolean costly_adjacent(struct monst *, coordxy, coordxy);
extern struct obj *shop_object(coordxy, coordxy);
extern void price_quote(struct obj *);
extern void shk_chat(struct monst *);