Bug - Fixed Hundred headed IPA mishap

CLI output:

Code:
> drink 8 hundred

Searching for "Hundred Headed IPA"...
Search complete.
Purchasing Hundred Headed IPA (8 @ 4,900)...
Unrecognized item found: 8 Bottles of Hundred Headed IPA
Purchasing Hundred Headed IPA (2 @ 5,000)...
Unrecognized item found: 2 Bottles of Hundred Headed IPA
Purchasing Hundred Headed IPA (3 @ 5,200)...
Unrecognized item found: 3 Bottles of Hundred Headed IPA
Purchasing Hundred Headed IPA (8 @ 5,700)...
Unrecognized item found: 8 Bottles of Hundred Headed IPA
Purchasing Hundred Headed IPA (1 @ 5,800)...
Purchasing Hundred Headed IPA (7 @ 5,900)...
Unrecognized item found: 7 Bottles of Hundred Headed IPA
Purchasing Hundred Headed IPA (2 @ 6,000)...
Unrecognized item found: 2 Bottles of Hundred Headed IPA
Purchasing Hundred Headed IPA (5 @ 7,100)...
Unrecognized item found: 5 Bottles of Hundred Headed IPA
Purchasing Hundred Headed IPA (2 @ 7,150)...
Unrecognized item found: 2 Bottles of Hundred Headed IPA
Purchasing Hundred Headed IPA (2 @ 8,750)...
Unrecognized item found: 2 Bottles of Hundred Headed IPA
Desired purchase quantity not reached (wanted 8, got 1)
Using cached search results for Hundred Headed IPA...
Purchasing Hundred Headed IPA (7 @ 4,900)...
Unrecognized item found: 7 Bottles of Hundred Headed IPA
Purchasing Hundred Headed IPA (1 @ 5,700)...
Desired purchase quantity not reached (wanted 7, got 1)

Rather than purchasing and drinking 8 HH IPAs, mafia went through buying several (presumably up to 8?) from each store that offered them, starting with the cheapest, until I ran out of meat. Does this have something to do with the item's name, should I refer to it as "headed ipa" from now on when using CLI commands? This was my first time ever drinking it. Was using r12969.
 
Last edited:

slyz

Developer
Mafia didn't know the plural, "Bottles of Hundred Headed IPA". This has been fixed in r12971.

We should probably stop everything when encountering an unrecognized item while purchasing from the mall.
 

Veracity

Developer
Staff member
I expect I can fix the underlying issue. There was code to go into an error state when you get an unrecognized item back from a mall purchase, with the comment that perhaps the item name or plural had changed. However, the way it detected that was sort of kludgey, and the path that generated it was no longer exercised when I whacked the mall purchasing code to deal with the new mall, where items could end up either in storage or in inventory.

I think we can assume that if you get an item back from KoL after doing a mall purchase, that you got the correct item - and possibly even register changed names or new plurals - and in any case, not get fooled.

I'm working on it.
 

Yendor

Member
There are... quite a lot of items without recorded plurals currently. Is there a relatively easy way of adding them in?

Incidentally, the entry for debonair deboner (6585) lists the autosell twice, pushing out the plural.
 

Veracity

Developer
Staff member
Revision 12978 assumes that if you receive an item from a mall purchase, it is the one you expect. If you were buying more than one, the returned name is the plural. If you were buying just one, the name has changed. In either case, we register the changed or unknown name and add the correct item to your inventory.

Revision 12979 fixes the debonair deboner.

Regarding items without recorded plurals: if the plural is simply the name with an "s" at the end, we deduce it correctly.
I suppose you could write a script to put out a copy of items.txt with all previously unlisted plurals added as item name + "s". Obviously, some will probably be wrong, but KoLmafia will have the same problem with an incorrect plural as with no plural.
 
Top