]> granicus.if.org Git - nethack/commit
fix bz238 - looting many containers
authorPatR <rankin@nethack.org>
Tue, 8 Mar 2016 00:38:05 +0000 (16:38 -0800)
committerPatR <rankin@nethack.org>
Tue, 8 Mar 2016 00:38:05 +0000 (16:38 -0800)
commit6106a7240fdf9dd3cbdfda54469ddb30442b7c66
tree511702cef5dabf1c457e58b2bee7f00fd4ce2ad4
parente3d2dfc7fba6b8abfeb0cd204d7e2e4096fb3d62
fix bz238 - looting many containers

"Looting many containers via menu cannot be stopped".  When the
player uses #loot command at a location with multiple containers,
a menu of which ones to loot is presented and player can pick any
or all of them.  But if you terminate the looting of a particular
container with ESC, it goes on to the next selected one rather than
stopping the loot action because that's what the 'q' choice does.

The simplest fix would be to allow choosing only one container
from the "loot which?" menu, but this retains the ability to loot
multiple containers on a pile in one turn.  It makes looting
stoppable by extending the ":iobrsq or ?" prompt, adding 'n' for
"next container" and changing 'q' from "done with this container"
to "done looting" (with ESC still a synonym for 'q').  When just
one container is being looted, or when on the last of N containers,
'n' is not shown but is still accepted (and treated as 'q').

Also, use_container() was using a menu for ":iobrsq" if player had
menustyle set to Full when it was intended to be for Partial (name
confusion...).  This switches Partial to use menu for loot action,
and leaves Full with that since that's how 3.6.0 has been behaving.
Traditional and Combination use the prompt string and single char
response.
doc/fixes36.1
include/extern.h
src/apply.c
src/pickup.c