Bug - Fixed Recent change in item matching?

psly4mne

Member
I've noticed recently that item name matching is not as useful as it was in the past. I can't really tell exactly what is happening. "Untinker abridge" used to buy the abridged dictionary from the bookstore and untinker it; now it does not work unless I acquire the dicctionary first. "Eat fortune" used to buy and eat a fortune cookie. Now it produces "fortune cookie; naughty fortune teller; [fortune] has too many matches." I believe this is related to r14363 (http://kolmafia.us/showthread.php?1...es-don-t-restrict-to-things-in-your-inventory), but I could be wrong.
 

Veracity

Developer
Staff member
Since revision 14363 only affects how ASH parses $item[], it clearly has nothing to do with CLI commands.
 

psly4mne

Member
That was the only recent revision I saw that was related to item parsing. I have no idea what change causes this then.
 

Veracity

Developer
Staff member
No, I refactored ItemFinder a month ago or so. You are reporting two bugs:

- "eat" no longer filters on food
- "untinker" requires items to be in inventory, even thought the Untinker request does an "acquire".

Both are related to the change:

- Although the use/eat/drink/etc. command decides which filter to use, it doesn't pass it to ItemFinder
- The untinker command explicitly passes inventory as the list to search, rather than null.

Revision 14586 addresses both of those bugs.
 

Veracity

Developer
Staff member
For the record:

Code:
r14366 | veracity0 | 2014-08-11 13:08:06 -0400 (Mon, 11 Aug 2014) | 2 lines

Perform Major Whackage on ItemFinder to make API more rational
I had assumed that any bugs in this would show up within a week or two of when I released it, not a month later after I'd spun a new release containing this code. I wonder how many other people noticed a change of behavior a month ago but didn't bother to report it?
 

Bale

Minion
I use an alias to eat fortune cookies, so I totally missed the bug. :(

Code:
alias fc => counters; ashq if(length(get_counters("Fortune Cookie", 0, 200)) == 0) {if(my_fullness() < fullness_limit()) {retrieve_item(1, $item[fortune cookie]); matcher fortune = create_matcher("cellpadding=10><tr><td>(.*?)<p>", visit_url("inv_eat.php?pwd&ajax=1&which=1&whichitem=61")); if(find(fortune)) print_html("<br><font color='green'>"+fortune.group(1)+"<font>");} else print("Too stuffed to eat a fortune cookie!", "red");} else print("You've already eaten a Fortune Cookie!", "red");

My alias makes sure that I didn't previously eat a cookie to prevent my own foolishness and after I eat, it prints out the cookie's hint just because I like to see it.
 
Last edited:
Top