From 991e739af4b457f7b3f9d8394be68a3be34f8cca Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Fri, 27 May 2022 19:36:26 -0400 Subject: [PATCH] Fix: loot regression, auto-select with justpicked When using 'A'/autopick with the 'items you just picked up' category, instead of autoselecting all items within that category, it selected every item in your inventory (like it used to work before 3.7). Just blew up a bag of holding because of this. While testing the fix for that, I noticed 'P' wasn't working at all with menustyle:traditional -- you could select it as a filter, but it didn't actually get applied to anything, so it would end up prompting you for every item in inventory. Fix both those things. --- src/invent.c | 3 ++- src/pickup.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/invent.c b/src/invent.c index 3fe7e29f5..75133d650 100644 --- a/src/invent.c +++ b/src/invent.c @@ -2115,7 +2115,8 @@ askchain( ininv = (*objchn == g.invent); bycat = (menu_class_present('u') || menu_class_present('B') || menu_class_present('U') - || menu_class_present('C') || menu_class_present('X')); + || menu_class_present('C') || menu_class_present('X') + || menu_class_present('P')); /* someday maybe we'll sort by 'olets' too (temporarily replace flags.packorder and pass SORTLOOT_PACK), but not yet... */ diff --git a/src/pickup.c b/src/pickup.c index 79f74ebc1..0882d618d 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -3047,6 +3047,7 @@ menu_loot(int retry, boolean put_in) loot_justpicked = TRUE; count = max(0, pick_list[i].count); add_valid_menu_class(pick_list[i].item.a_int); + loot_everything = FALSE; } else if (pick_list[i].item.a_int == ALL_TYPES_SELECTED) { all_categories = TRUE; } else { -- 2.50.1