From 8a9c06f5c150017fdea69a1ce99edef3185d93eb Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 24 Jun 2019 18:54:38 -0700 Subject: [PATCH] 'sortpack' vs 'perm_invent' The persistent inventory window wasn't being updated if you toggled the 'sortpack' option interactively. (The new setting was honored once something else triggered a 'perm_invent' update.) The logic for toggling 'fixinv' seemed backwards. I hope this "fix" for that hasn't actually broken it. --- doc/fixes36.3 | 3 ++- src/options.c | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 45975b85c..91e5d7f12 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.67 $ $NHDT-Date: 1561426762 2019/06/25 01:39:22 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.68 $ $NHDT-Date: 1561427671 2019/06/25 01:54:31 $ 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, @@ -88,6 +88,7 @@ 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 saving bones with 'perm_invent' On could result in "Bad fruit #N" warnings +update persistent inventory window immediately if 'sortpack' option is toggled Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/options.c b/src/options.c index 20c82ba4e..ef1081172 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1561022792 2019/06/20 09:26:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.365 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1561427671 2019/06/25 01:54:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.366 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4051,12 +4051,12 @@ boolean tinitial, tfrom_file; if (VIA_WINDOWPORT()) status_initialize(REASSESS_ONLY); context.botl = TRUE; - } else if (boolopt[i].addr == &flags.invlet_constant) { - if (flags.invlet_constant) { + } else if (boolopt[i].addr == &flags.invlet_constant + || boolopt[i].addr == &flags.sortpack) { + if (!flags.invlet_constant) reassign(); - if (iflags.perm_invent) - need_redraw = TRUE; - } + if (iflags.perm_invent) + update_inventory(); } else if (boolopt[i].addr == &flags.lit_corridor || boolopt[i].addr == &flags.dark_room) { /* -- 2.40.0