]> granicus.if.org Git - nethack/commit
#tipping shop containers (trunk only)
authornethack.rankin <nethack.rankin>
Thu, 9 Nov 2006 06:36:36 +0000 (06:36 +0000)
committernethack.rankin <nethack.rankin>
Thu, 9 Nov 2006 06:36:36 +0000 (06:36 +0000)
commitf8f5642d3ab41daa6dd6db90143c64545ca1f04c
tree877e2822109cca4baf46e0fe175e43080ab25834
parentef2085bcafcd9ad1a45db43fa5212a62da9bbd52
#tipping shop containers (trunk only)

     Using #tip (post-3.4.3 code) on a container that's on a shop floor
didn't handle ownership correctly.  Bag of tricks could be emptied for
free, and contents of other containers were being sold to the shop even
when the shop already owned them.  This fixes bag of tricks and makes a
first cut at doing so for regular containers.

     Message handling when #tipping any bag of tricks was also suboptimal
since the decision about message delivery was made again as each charge
released something instead of waiting until the whole bag was emptied.
So you could get inappropriate "nothing seems to happen" before or after
a monster visibily popped up if something unseen was also produced.
include/extern.h
src/apply.c
src/makemon.c
src/mkobj.c
src/pickup.c