Bug - Fixed Mafia got an item into Hangks by accident

heeheehee

Developer
Staff member
Code:
> use 5 hair spray

Searching for "hair spray"...
Search complete.
Purchasing hair spray (4 @ 22)...
You acquire hair spray (4)
You spent 88 Meat
Purchasing hair spray (1 @ 100)...
Purchases complete.
You need 1 more hair spray to continue.

Hm. That's awkward.

(r13211, in HC, not enough meat to purchase a fifth hair spray)
 

Bale

Minion
That looks like a bug with the logic for acquire.

I moved your post into a new bug report because you should have been reporting a bug.
 

Bale

Minion
And once more it is proven that a properly functioning retrieve_item() obviates the need for npc_purchase() — Yay!
 

Veracity

Developer
Staff member
The interesting thing is, I made an internal function - StoreManager.searchNPCs - to get a list of PurchaseRequests from ONLY NPC stores, rather than doing a mall search and adding the NPC result to that list. Calling that function, followed by KoLmafia.makePurchases with the returned list, is EXACTLY what npc_purchase would do.

Given that, I'm not all that hostile any more to npc_purchase - except that I believe that no correctly written program will ever need to use it, so, why bother? :)
 

Bale

Minion
Given that, I'm not all that hostile any more to npc_purchase - except that I believe that no correctly written program will ever need to use it, so, why bother? :)

That is a reason to be hostile to it. I dislike a function whose purpose is to enable foolish practices.
 
Top