removing all items via 'A' when looting container

Followup to 'fix #148' patch:  looting a container with menustyle:Full
wasn't offering a chance to remove everything in one go.  That was due
to an error I introuduced 2.5 years ago with commit
529dad8ef1 when I changed how the flags
passed to query_category() were being set up.  It accidentally switched
'A' from take-out to put-in but the only code to handle 'A' at that
time would take everything out (from container to inventory).

Prior to that, removing everything worked as intended and putting in
everything wasn't supported.  Now 'A - autoselect all' is a viable
choice for both in and out.
This commit is contained in:
PatR
2018-11-03 23:17:49 -07:00
parent 6002db106c
commit f68883beb3
2 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 pickup.c $NHDT-Date: 1541292247 2018/11/04 00:44:07 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.200 $ */
/* NetHack 3.6 pickup.c $NHDT-Date: 1541312259 2018/11/04 06:17:39 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.201 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2720,9 +2720,7 @@ boolean put_in;
} else if (flags.menu_style == MENU_FULL) {
all_categories = FALSE;
Sprintf(buf, "%s what type of objects?", action);
mflags = (ALL_TYPES | UNPAID_TYPES | BUCX_TYPES);
if (put_in)
mflags |= CHOOSE_ALL;
mflags = (ALL_TYPES | UNPAID_TYPES | BUCX_TYPES | CHOOSE_ALL);
n = query_category(buf, put_in ? invent : current_container->cobj,
mflags, &pick_list, PICK_ANY);
if (!n)