diff --git a/doc/fixes36.3 b/doc/fixes36.3 index bbc324668..c71dc5bb6 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.64 $ $NHDT-Date: 1561233801 2019/06/22 20:03:21 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.65 $ $NHDT-Date: 1561314651 2019/06/23 18:30:51 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -84,6 +84,9 @@ partly eaten food with one bite left had message anomalies when eaten; the usual "you resume your meal" case lacked the "you're finished" message when done; eating something else in between to clobber meal context resulted in no messages at all when restarting and finishing last bite +wizard mode ^I menu could list "Not carrying anything" after inventory items + if perm_invent option was On (even on tty where that's not supported) +change #adjust to treat carrying only gold as not having anything to adjust Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/invent.c b/src/invent.c index 94e0053ca..a4175e2a8 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1558234540 2019/05/19 02:55:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.258 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1561314651 2019/06/23 18:30:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.259 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2550,7 +2550,7 @@ long *out_cnt; menu_item *selected; unsigned sortflags; Loot *sortedinvent, *srtinv; - boolean wizid = FALSE; + boolean wizid = FALSE, gotsomething = FALSE; if (lets && !*lets) lets = 0; /* simplify tests: (lets) instead of (lets && *lets) */ @@ -2654,13 +2654,14 @@ long *out_cnt; /* wiz_identify stuffed the wiz_identify command character (^I) into iflags.override_ID for our use as an accelerator; it could be ambiguous if player has assigned a letter to - the #wizidentify command */ + the #wizidentify command, so include it as a group accelator + but use '_' as the primary selector */ if (unid_cnt > 1) Sprintf(eos(prompt), " (%s for all)", visctrl(iflags.override_ID)); add_menu(win, NO_GLYPH, &any, '_', iflags.override_ID, ATR_NONE, prompt, MENU_UNSELECTED); - wizid = TRUE; + wizid = gotsomething = TRUE; } } else if (xtra_choice) { /* wizard override ID and xtra_choice are mutually exclusive */ @@ -2670,6 +2671,7 @@ long *out_cnt; any.a_char = HANDS_SYM; /* '-' */ add_menu(win, NO_GLYPH, &any, HANDS_SYM, 0, ATR_NONE, xtra_choice, MENU_UNSELECTED); + gotsomething = TRUE; } nextclass: classcount = 0; @@ -2695,6 +2697,7 @@ long *out_cnt; add_menu(win, obj_to_glyph(otmp, rn2_on_display_rng), &any, ilet, wizid ? def_oc_syms[(int) otmp->oclass].sym : 0, ATR_NONE, doname(otmp), MENU_UNSELECTED); + gotsomething = TRUE; } } if (flags.sortpack) { @@ -2712,13 +2715,14 @@ long *out_cnt; any.a_char = '*'; add_menu(win, NO_GLYPH, &any, '*', 0, ATR_NONE, "(list everything)", MENU_UNSELECTED); + gotsomething = TRUE; } unsortloot(&sortedinvent); /* for permanent inventory where we intend to show everything but nothing has been listed (because there isn't anyhing to list; - recognized via any.a_char still being zero; the n==0 case above - gets skipped for perm_invent), put something into the menu */ - if (iflags.perm_invent && !lets && !any.a_char) { + the n==0 case above gets skipped for perm_invent), put something + into the menu */ + if (iflags.perm_invent && !lets && !gotsomething) { any = zeroany; add_menu(win, NO_GLYPH, &any, 0, 0, 0, not_carrying_anything, MENU_UNSELECTED); @@ -4016,8 +4020,11 @@ doorganize() /* inventory organizer by Del Lamb */ const char *adj_type; boolean ever_mind = FALSE, collect; - if (!invent) { - You("aren't carrying anything to adjust."); + /* when no invent, or just gold in '$' slot, there's nothing to adjust */ + if (!invent || (invent->oclass == COIN_CLASS + && invent->invlet == GOLD_SYM && !invent->nobj)) { + You("aren't carrying anything %s.", + !invent ? "to adjust" : "adjustable"); return 0; }