]> granicus.if.org Git - nethack/commitdiff
more TTYINV=4 - lamps/leashes
authorPatR <rankin@nethack.org>
Mon, 26 Sep 2022 21:50:10 +0000 (14:50 -0700)
committerPatR <rankin@nethack.org>
Mon, 26 Sep 2022 21:50:10 +0000 (14:50 -0700)
When persistent inventory is set to only show items-in-use, include
leashes attached to pets and lit lamps and candles, same as the '*'
command.

src/invent.c

index 46ee2abdb43040b941712275810c7bf8228da2fe..ff93efa2654151e389453585be165ddf1ab31b04 100644 (file)
@@ -3378,9 +3378,11 @@ display_pickinv(
                 continue;
             if (doing_perm_invent) {
                 /* when showing equipment in use, gold shouldn't be excluded
-                   just because !show_gold is set; it might be quivered */
+                   just because !show_gold is set; it might be quivered;
+                   tool_being_used() matches lit lamps/candles and active
+                   leashes, neither of which set owornmask */
                 if (inuse_only) {
-                    if (!otmp->owornmask) {
+                    if (!otmp->owornmask && !tool_being_used(otmp)) {
                         skipped_noninuse = TRUE;
                         continue;
                     }