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.
This commit is contained in:
PatR
2022-09-26 14:50:10 -07:00
parent effc29c000
commit 2b7e82728b

View 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;
}