Bug - Fixed Mafia doesn't acquire items from the mall when I use the cli "use" command

ereinion

Member
When attempting to use items through the cli "use" command, mafia doesn't acquire items from the mall, even if I have the option-box "Buy items from the mall whenever needed" checked (I think that is the top result returned from the prefref I did below, but I also checked my preferences manually). Did a debug-log, but I am not sure if it contains much relevant information :p View attachment DEBUG_20140811.txt

Code:
[COLOR=olive]> use rock salt[/COLOR]

[COLOR=red][chunk      of rock salt] requested, but none available.[/COLOR]

[COLOR=olive]>      acquire rock salt[/COLOR]

Searching for "chunk of rock salt"...
Search      complete.
Purchasing chunk of rock salt (1 @ 450)...
Purchases      complete.

[COLOR=olive]> prefref mall[/COLOR]

autoSatisfyWithMall      (global, now 'true', default 'false')
cacheMallSearches (global, now      'true', default 'false')
relayHidesJunkMallItems (global, now 'false',      default 'false')
basementMallPrices (user, now '1', default '1')

[COLOR=olive]>      use rock salt[/COLOR]

Using 1 chunk of rock salt...
You acquire      an effect: Fresh Scent (duration: 10 Adventures)
Finished using 1 chunk      of rock salt.

[COLOR=olive]> use rock salt[/COLOR]

[COLOR=red][chunk      of rock salt] requested, but none available.[/COLOR]
 

ereinion

Member
It wasn't on the Daily Builds site when I logged on to KoL today, and I did check if there were any new ones there before making the thread :-D I do see that there was a release in the SVN repository before this thread, so I should have seen you'd whacked some item stuff on the front page :p Sorry for not being more attentive :)

-edit- And it works fine in r14366, but I guess I don't have to tell you that ;)
 

Veracity

Developer
Staff member
There are other issues with this.

"use * ten-leaf clover" currently only uses 1 clover, rather than everything you have in inventory.
"use 2 handful of pine needles" will buy as needed to get and use 2.

It gets even more tricky if you say "use * ten-leaf clover, 2 handful of pine needles"; I want it to limit the former to what is in inventory, but allow the latter to be purchased.

Working on it.
 

ereinion

Member
I had some trouble with it not acquiring items from the mod-maxer either (which I hadn't noticed when I made the first post), but it seems to work now. I'll let you know if I come across anything else.

Oh, and thanks for putting in the work :D
 

Veracity

Developer
Staff member
I broke it, I needed to fix it.

I think revision 14367 will use the number in inventory for "*" or "-5", for example, but will otherwise use the specified number, which will let KoLmafia pull or buy or whatever to get the required number.
 

ereinion

Member
While I appreciate that kind of work ethic, it is still a lot of work you put in for free :) So you definitely deserve thanks :)
 
Top