Anonymous | Login | 2024-04-26 12:56 CEST |
Main | My View | View Issues | Change Log | Wiki | Tavern | News |
Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||
0001402 | [DCSS] Bug Report | minor | always | 2010-04-22 10:08 | 2012-09-13 22:01 | ||
Reporter | Kate | View Status | public | ||||
Assigned To | neil | ||||||
Priority | normal | Resolution | done | ||||
Status | closed | Product Branch | 0.7 ancient branch | ||||
Summary | 0001402: Shopping list asks to remove manual when a different kind of manual is picked up | ||||||
Description | I had a manual of Necromancy on my shopping list and picked up a stack of books from my stash, containing a previously found manual of Throwing. Upon picking up the manual of Throwing, I was asked if I wanted to remove the manual of Necromancy from my shopping list. Pressing enter at this prompt resulted in: "The manual of Throwing isn't on shopping list, can't delete it." | ||||||
Additional Information | |||||||
Tags | shopping list | ||||||
Attached Files | 0001-Address-cull_identical_items-and-find_thing-issues-f.patch [^] (4,804 bytes) 2010-12-08 20:40 [Show Content] | ||||||
|
Relationships | ||||||||||||||||
|
Notes | |
(0009631) ahpla (reporter) 2010-12-08 20:40 edited on: 2010-12-08 20:41 |
This and issue 0002167 are related. I've attached a patch which fixes both, but I have some notes below which should be considered due to my unfamiliarity with the code. My investigations revealed that the bulk of the problem is caused by find_thing(), shopping.cc:2873, specifically: if (pos != _pos) continue; If I understand the code correctly, it doesn't makes sense to make such a comparison in the scenario MarvinPA experienced. In fact, I can't think of any time it would be useful, unless I'm missing something. As a result of this, the const bool on_list defined in cull_identical_items() at shopping.cc:2427 is always false in such a scenario, because find_thing() returns -1 every time. Finally, a second separate issue in cull_identical_items(), shopping.cc:2518 is: if (add_item && !on_list) add_thing(item, cost); I'm not sure why it checks that the item is not already on the shopping list via on_list at this stage. After applying my fix, the cull_identical_items() function would not get as far as setting the add_item boolean if the item wasn't already on the shopping list (and before my fix, it would always be false anyway). My patch addresses this issue also. |
(0011685) smock (reporter) 2011-03-18 20:40 |
A similar error in 0.8.0-a0-5764 Windows tiles: MESSAGE LOG: Identify which item? (? for menu, Esc to quit) As you read the scroll of identify, it crumbles to dust. Shopping-list: remove a +0,+6 ring of slaying on D:11? (Y/n) The uncursed ring of slaying isn't on shopping list, can't delete it. r - a +1,+3 ring of slaying |
(0011694) KiloByte (manager) 2011-03-18 21:56 |
Even manuals of the same skill are not redundant. A manual is a consumable that lasts only for a small number of uses. If you want to manual-dance a skill, you'll most likely want as many as you can. |
(0017369) neil (administrator) 2012-03-19 05:06 edited on: 2012-03-19 06:22 |
Fixed in trunk (af4ac7e and 8f855e2 to not prompt when inappropriate, and e45dc40 to correctly remove an item that differs from the new one). |
Mantis 1.1.8[^] Copyright © 2000 - 2009 Mantis Group |