Opened 5 years ago

Closed 5 years ago

#1761 closed bug (fixed (in master))

Quiver slots not shown in inventory

Reported by: takkaria Owned by:
Milestone: 3.5.0 Keywords: windows
Cc:

Description

From http://angband.oook.cz/forum/showthread.php?t=6221

Just noticed that the "In quiver: x missiles" lines that show you how many slots your quiver is using are missing from the inventory list you get when you use the 'i' key. (They appear just fine if you display the inventory in a separate subwindow.)

This is on Windows, if that's relevant; looks like the bug was introduced somewhere between 3.4.0 and 3.4.1.

Change History (5)

comment:1 Changed 5 years ago by takkaria

  • Resolution set to fixed (in master)
  • Status changed from new to closed

Fixed in d0930e8.

comment:2 Changed 5 years ago by PowerWyrm

  • Resolution fixed (in master) deleted
  • Status changed from closed to reopened

Reopening this as the fix breaks a previous fix for inventory command displaying empty slots.

Proper fix:

  • revert commit d0930e8308dcc7cce9b20c82ae9308b755d5fcbd
  • in get_item(), remove check for item_tester_full when showing/hiding the quiver (OLIST_QUIVER)

comment:3 Changed 5 years ago by PowerWyrm

Oops, this doesn't work either. It makes the quiver also displayed when using other commands, not only 'i' for inventory.

Proposed fix: add a new flag, SHOW_QUIVER, similar to SHOW_PRICES or SHOW_FAIL, pass this flag ORed with the mode parameter to the call to get_item() in do_cmd_inven(), and process this flag in get_item() like SHOW_PRICES or SHOW_FAIL.

comment:4 Changed 5 years ago by PowerWyrm

do_cmd_inven():

if (get_item(&item, NULL, NULL, CMD_NULL,
  USE_EQUIP|USE_INVEN|USE_FLOOR|IS_HARMLESS|SHOW_QUIVER))
...

get_item():

if (mode & SHOW_QUIVER) olist_mode |= OLIST_QUIVER;
... show_inven ...
if (mode & SHOW_QUIVER) olist_mode &= ~OLIST_QUIVER;

Seems to work...

comment:5 Changed 5 years ago by takkaria

  • Resolution set to fixed (in master)
  • Status changed from reopened to closed

Thanks for the suggestion; I've done a bit more refactoring than that but it seems to all be working OK.

Note: See TracTickets for help on using tickets.