From 2b7e82728b1061f2f47d7b6b4ad115ba87bcafeb Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 26 Sep 2022 14:50:10 -0700 Subject: [PATCH] more TTYINV=4 - lamps/leashes 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/invent.c b/src/invent.c index 46ee2abdb..ff93efa26 100644 --- a/src/invent.c +++ b/src/invent.c @@ -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; }