fix issue #872 - container-to-container #tip

Reported by k2:  tipping one container's contents directly into
another container allowed transferring a wand of cancellation (not
mentioned:  or a bag of holding or a bag of tricks) into a bag of
holding without blowing it up.

That's now fixed.  There are other issues that this doesn't touch:

I think it's odd that you can transfer stuff from one carried
container to another but not from a carried container to a floor
container nor from one floor container to another one at same spot.

I didn't test shop billing so an not sure what happens when #tip
blows up a bag of holding and there are some unpaid items involved.

Using #tip on horn of plenty treats it like a container, but doing
that when it's carried doesn't offer the chance to tip its contents
directly into a carried container.

Tipping a carried container does not require free hands or even
limbs (for playability) but tipping such into another container
should require at least one free hand.

Fixes #872
This commit is contained in:
PatR
2022-09-12 14:17:22 -07:00
parent 356e3176bc
commit 7ae4efb07c
4 changed files with 37 additions and 18 deletions

View File

@@ -2105,7 +2105,7 @@ extern int doloot(void);
extern void observe_quantum_cat(struct obj *, boolean, boolean);
extern boolean container_gone(int(*)(struct obj *));
extern boolean u_handsy(void);
extern int use_container(struct obj **, int, boolean);
extern int use_container(struct obj **, boolean, boolean);
extern int loot_mon(struct monst *, int *, boolean *);
extern int dotip(void);
extern struct autopickup_exception *check_autopickup_exceptions(struct obj *);