Bug - Fixed "buy 6 rad lib" confuses Mafia (plural needed?)

heeheehee

Developer
Staff member
Code:
> buy 6 rad lib

Searching for "Rad Lib"...
Search complete.
Purchasing Rad Lib (6 @ 1,200)...
Purchasing Rad Lib (6 @ 1,200)...
Purchasing Rad Lib (2 @ 1,380)...
Purchasing Rad Lib (4 @ 1,390)...
Desired purchase quantity not reached (wanted 6, got 0)

> acquire 6 rad lib

You need 6 more Rad Lib to continue.

> inv rad lib

Tome of Rad Libs (18)

If I had to guess, explicitly adding the plural to Mafia ("Rad Libs") would fix this.
 

Veracity

Developer
Staff member
The plural of Rad Lib is Rad Libs - and it is already in items.txt. When we process the results, we see "You acquire 2 Rad Libs", ResultProcessor calls ItemDatabase.getItemId with count = 2 and itemName = "Rad Libs", which in turn calls ItemDatabase.getCanonicalName with those parameters - and that method notices that 2 is not equal to 1 and looks for the plural name first.

In my test, when I said "buy 2 rad lib" it bought me 2 rad libs. Which is to say, it did exactly the right thing.

I have no idea why it didn't work for you, since I can't reproduce it, but since we pass in the item id we want to obtain when we do a mall purchase, revision 13295 assumes that if we get something back, it is that item id.
 
Top