]> granicus.if.org Git - nethack/commitdiff
wiz_identify vs perm_invent
authorPatR <rankin@nethack.org>
Tue, 9 Feb 2021 23:07:16 +0000 (15:07 -0800)
committerPatR <rankin@nethack.org>
Tue, 9 Feb 2021 23:07:16 +0000 (15:07 -0800)
Using ^I to identify inventory and picking '_' (or '^I' or full
menu) would update persistent inventory window after identifying
everything, but picking specific items (even everything as long
as '_' was excluded) to identify wasn't doing that.

I moved some fixes37.0 entries around to group the persistent
inventory ones together.  One involved hold_another_object so I
group those too.  I didn't look very hard to try to find others
that could fit with these.

doc/fixes37.0
src/invent.c

index a07e9eff44f3be7ba9974a50575d78f74d9b53e9..715d0b5d146bec2eea969c41f119438f165abb20 100644 (file)
@@ -1,4 +1,4 @@
-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.446 $ $NHDT-Date: 1612656277 2021/02/07 00:04:37 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.448 $ $NHDT-Date: 1612912018 2021/02/09 23:06:58 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -74,8 +74,27 @@ if the orc-town version of mine town has been loaded, creation of orc zombies
 when punished, involuntarily teleporting and landing within chain range of
        attached ball while encumbered worse than burdened could trigger
        "remove_object: obj not on floor" panic on hero's next move
+update persistent inventory when putting on a helmet causes it to auto-curse
 inventory cursing caused by "this water's no good" effect when drinking from
        a fountain didn't update persistent inventory window
+leashing or unleashing pets wasn't updating persistent inventory window
+when the wetness of a towel in inventory changed, persistent inventory wasn't
+       updated to show that
+using wizard mode identify to ID 'all' updated perm_invent window but IDing
+       specific items--even every one of them--did not
+hold_another_object added item to inventory first, then maybe removed and
+       dropped it, resulting in spurious add and remove perm_invent updates
+when hold_another_object fails while hero is swallowed, drop the item into
+       swallower's inventory instead of onto the floor
+hold_another_object (for wishing, horn of plenty, theft while poly'd, other
+       non-pickup actions giving hero another inventory item) wasn't
+       reporting change in encumbrance; that would catch up on next turn but
+       could be off during additional move(s) for current turn
+hold_another_object used hardcoded Stressed to limit carrying instead of
+       using the 'pickup_burden' option for that
+transforming a potion by dipping a unicorn horn into it could result in the
+       potion being dropped due to 'pickup_burden' if encumbrance was already
+       over threshold before dipping but within it after removal from invent
 fix priest created inside temple wall
 fix vault guard occasionally encasing monsters in stone
 tone down scare monster by excluding humans and uniques
@@ -178,16 +197,6 @@ falling while going down stairs and dropping items due to encumbrance or
        punishment wasn't subjecting fragile ones to breakage
 objects scattered by an explosion which land on water or lava weren't affected
        by the water or lava
-hold_another_object (for wishing, horn of plenty, theft while poly'd, other
-       non-pickup actions giving hero another inventory item) wasn't
-       reporting change in encumbrance; that would catch up on next turn but
-       could be off during additional move(s) for current turn
-hold_another_object added item to inventory first, then maybe removed and
-       dropped it, resulting in spurious add and remove perm_invent updates
-hold_another_object used hardcoded Stressed to limit carrying instead of
-       using the 'pickup_burden' option for that
-when hold_another_object fails while hero is swallowed, drop the item into
-       swallower's inventory instead of onto the floor
 change mkclass() to usually honor (always honor for L class) the hell-only and
        never-in-hell monster creation flags; no more achi-lich in the Castle
        (nor master lich there unless demilich gets a potion of gain level)
@@ -247,7 +256,6 @@ wizard mode #wizintrinsic: setting Levitation wouldn't block Flying as
 chatting to the quest leader in wizard mode with sufficient experience level
        and insufficient piety, player is asked whether alignment should be
        boosted; answering 'n' resulted in being prompted a second time
-leashing or unleashing pets wasn't updating persistent inventory window
 end of game inventory disclosure passed an inappropriate argument to the
        inventory display routine; not noticeable for tty and curses,
        noticeable but not harmful for X11, and slightly harmful for Qt
@@ -294,7 +302,6 @@ hero could break a wand ("raising the wand high over your head, you break it
        one-handed weapon and also to a shield
 if a monster threw a cocktrice egg at the hero but hit and petrified another
        monster, the hero would get credit/blame for killing it
-update persistent inventory when putting on a helmet causes it to auto-curse
 since ki-rin look quite a bit like unicorns, make them be more like one:
        allow them to use their own horn to cure themselves; remove M1_ANIMAL,
        change MS_NEIGH to MS_SPELL, add MR_POISON, use horse body parts;
@@ -333,8 +340,6 @@ selling a container to a shop for gold leaves any contents that the shop
 add some new demonic and angelic maledictions
 when fire damage dried a wet towel, it would never reduce the wetness to 0
 when water damage wet a towel, the new wetness might randomly become less
-when the wetness of a towel in inventory changed, persistent inventory wasn't
-       updated to show that
 make Death revive earlier, and all the Riders after 67 turns at latest
 when protection from shape changers begins, force mimic out of concealment
        even if hero can't see its location; for locations that can be seen,
@@ -361,9 +366,6 @@ when a pet ate a mimic corpse and tried to temporarily look like a sink it
        ended up looking like a throne (terrain type SINK == symbol S_throne)
 have dowhatdoes ('&') catch up with '?i' to describe ^A, ESC, and movement
        prefix keystrokes correctly instead of reporting "no such command"
-transforming a potion by dipping a unicorn horn into it could result in the
-       potion being dropped due to 'pickup_burden' if encumbrance was already
-       over threshold before dipping but within it after removal from invent
 give barrow wights a cold touch
 for configuration using external compression on save files that applied a name
        suffix, 'selectsaved' (restore via menu) couldn't handle any which had
index 38199e98a022d5f3002ac00bd78636c46d99d5f1..0a4d178ddf292c19beadef44fc1a2adbd346e47c 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 invent.c        $NHDT-Date: 1612738685 2021/02/07 22:58:05 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.318 $ */
+/* NetHack 3.7 invent.c        $NHDT-Date: 1612912018 2021/02/09 23:06:58 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.319 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Derek S. Ray, 2015. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -2218,8 +2218,7 @@ count_unidentified(struct obj *objchn)
 /* dialog with user to identify a given number of items; 0 means all */
 void
 identify_pack(int id_limit,
-              boolean learning_id) /* true if we just read unknown
-                                      identify scroll */
+              boolean learning_id) /* T: just read unknown identify scroll */
 {
     struct obj *obj;
     int n, unid_cnt = count_unidentified(g.invent);
@@ -2635,6 +2634,7 @@ display_pickinv(
                     &selected);
     if (n > 0) {
         if (wizid) {
+            boolean all_id = FALSE;
             int i;
 
             /* identifying items will update perm_invent, calling this
@@ -2646,11 +2646,17 @@ display_pickinv(
                 otmp = selected[i].item.a_obj;
                 if (otmp == &wizid_fakeobj) {
                     identify_pack(0, FALSE);
+                    /* identify_pack() performs update_inventory() */
+                    all_id = TRUE;
+                    break;
                 } else {
                     if (not_fully_identified(otmp))
                         (void) identify(otmp);
+                    /* identify() does not perform update_inventory() */
                 }
             }
+            if (!all_id)
+                update_inventory();
         } else {
             ret = selected[0].item.a_char;
             if (out_cnt)