From f68883beb3909c39eaefdc6707301a6fe56c453d Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 3 Nov 2018 23:17:49 -0700 Subject: [PATCH] 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 529dad8ef15d255e00ba2d75dd9a92d5030d97f5 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. --- doc/fixes36.2 | 2 ++ src/pickup.c | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 8f3a00c70..323d911df 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -183,6 +183,8 @@ added several special cases for genocide and/or wishing prompt: (cookie, lightning strike from Mjollnir did not make any noise with menustyle:Full, picking 'A - autoselect all' when putting items into a container actually took everything out of that container +add missing 'A - autoselect all' choice for menustyle:Full when taking items + out while looting a container Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/pickup.c b/src/pickup.c index 1c9d9d681..319f1f031 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -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)