Merge branch 'master' into NetHack-3.7

This commit is contained in:
nhmall
2019-06-28 18:30:47 -04:00
9 changed files with 103 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 invent.c $NHDT-Date: 1561314651 2019/06/23 18:30:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.259 $ */
/* NetHack 3.6 invent.c $NHDT-Date: 1561751391 2019/06/28 19:49:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.260 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2540,12 +2540,12 @@ long *out_cnt;
menu_item *selected;
unsigned sortflags;
Loot *sortedinvent, *srtinv;
boolean wizid = FALSE, gotsomething = FALSE;
boolean wizid = (wizard && iflags.override_ID), gotsomething = FALSE;
if (lets && !*lets)
lets = 0; /* simplify tests: (lets) instead of (lets && *lets) */
if (iflags.perm_invent && (lets || xtra_choice)) {
if (iflags.perm_invent && (lets || xtra_choice || wizid)) {
/* partial inventory in perm_invent setting; don't operate on
full inventory window, use an alternate one instead; create
the first time needed and keep it for re-use as needed later */
@@ -2637,6 +2637,7 @@ long *out_cnt;
add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE,
"(all items are permanently identified already)",
MENU_UNSELECTED);
gotsomething = TRUE;
} else {
any.a_obj = &wizid_fakeobj;
Sprintf(prompt, "select %s to permanently identify",
@@ -2651,7 +2652,7 @@ long *out_cnt;
visctrl(iflags.override_ID));
add_menu(win, NO_GLYPH, &any, '_', iflags.override_ID, ATR_NONE,
prompt, MENU_UNSELECTED);
wizid = gotsomething = TRUE;
gotsomething = TRUE;
}
} else if (xtra_choice) {
/* wizard override ID and xtra_choice are mutually exclusive */
@@ -2727,6 +2728,10 @@ long *out_cnt;
if (wizid) {
int i;
/* identifying items will update perm_invent, calling this
routine recursively, and we don't want the nested call
to filter on unID'd items */
iflags.override_ID = 0;
ret = '\0';
for (i = 0; i < n; ++i) {
otmp = selected[i].item.a_obj;