BUCX filtering

The different menustyle settings have been offering different degrees
of support for BUCX filtering:
  Full       : multi-drop, container-in, container-out
  Trad, Combo: multi-drop
  Partial    : none (to be expected; it explicitly jumps past class
    filtering, where BUCX gets handled, to a menu of all objects)

This adds pickup, container-in, container-out, multi-unwear/unwield,
and object-ID for Trad and Combo, and multi-unwear/unwield for Full.
(Full behaves like Partial for pickup--not sure why--and for object-ID,
bypassing filters to go straight to a menu of all applicable items.)

There are probably several new bugs--this stuff is very convoluted....
This commit is contained in:
PatR
2017-06-23 18:44:35 -07:00
parent 6a84840971
commit e32c09c5bf
6 changed files with 134 additions and 85 deletions

View File

@@ -2541,8 +2541,9 @@ int retry;
} else if (flags.menu_style == MENU_FULL) {
all_worn_categories = FALSE;
n = query_category("What type of things do you want to take off?",
invent, WORN_TYPES | ALL_TYPES, &pick_list,
PICK_ANY);
invent, (WORN_TYPES | ALL_TYPES
| UNPAID_TYPES | BUCX_TYPES),
&pick_list, PICK_ANY);
if (!n)
return 0;
for (i = 0; i < n; i++) {
@@ -2553,10 +2554,17 @@ int retry;
}
free((genericptr_t) pick_list);
} else if (flags.menu_style == MENU_COMBINATION) {
all_worn_categories = FALSE;
if (ggetobj("take off", select_off, 0, TRUE, (unsigned *) 0) == -2)
all_worn_categories = TRUE;
unsigned ggofeedback = 0;
i = ggetobj("take off", select_off, 0, TRUE, &ggofeedback);
if (ggofeedback & ALL_FINISHED)
return 0;
all_worn_categories = (i == -2);
}
if (menu_class_present('u')
|| menu_class_present('B') || menu_class_present('U')
|| menu_class_present('C') || menu_class_present('X'))
all_worn_categories = FALSE;
n = query_objlist("What do you want to take off?", &invent,
(SIGNAL_NOMENU | USE_INVLET | INVORDER_SORT),