Opened 7 years ago

Closed 7 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



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 7 years ago by takkaria

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

Fixed in d0930e8.

comment:2 Changed 7 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 7 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 7 years ago by PowerWyrm


if (get_item(&item, NULL, NULL, CMD_NULL,


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

Seems to work...

comment:5 Changed 7 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.