Bug - Fixed Consumables used from gCLI are double-subtracted

Theraze

Active member
When you consume items using the gCLI at the moment, mafia's inventory parser is counting their loss twice. I noticed this when I created two horizontal tangos and EatDrink claimed it couldn't drink the second. I then tested it by doing the following:
> inv skullheads

> create skullheads

Verifying ingredients for spaghetti with Skullheads (1)...
Verifying ingredients for sauce of the ages (1)...
Creating sauce of the ages (1)...
You acquire an item: sauce of the ages
Successfully created sauce of the ages (1)
Creating spaghetti with Skullheads (1)...
You acquire an item: spaghetti with Skullheads
Successfully created spaghetti with Skullheads (1)

> inv skullheads

spaghetti with Skullheads

> refresh inv

Refreshing closet...
Examining consumables in closet...
Examining equipment in closet...
Examining miscellaneous items in closet...
Updating inventory...
Requests complete.

> inv skullheads

spaghetti with Skullheads

> eat skullheads

Eating 1 spaghetti with Skullheads...
You gain 26 Adventures
You gain 51 Fortitude
You gain a Muscle point!
You gain 6 Fullness
Finished eating 1 spaghetti with Skullheads.

> inv skullheads
As you can see, I started with 0 spaghetti skullheads. I ended with 0 spaghetti skullheads. Session results says I have -1 spaghetti skullheads.

This applies to both eat and drink, at least. It doesn't appear to apply to spleen and usable items, since the barbell and extra-strength both only subtracted one item.
 

Veracity

Developer
Staff member
Code:
class net.sourceforge.kolmafia.request.UseItemRequest
Requesting: [url]http://www.kingdomofloathing.com/inv_eat.php?whichitem=584&which=1&quantity=1[/url]
Retrieved: [url]http://www.kingdomofloathing.com/inv_eat.php?whichitem=584&which=1&quantity=1[/url]
Redirected: inventory.php?which=1&action=message
class net.sourceforge.kolmafia.request.GenericRequest
Connecting to inventory.php...
Retrieved: [url]http://www.kingdomofloathing.com/inventory.php?which=1&action=message[/url]
Processing results...
--- processResults() from the redirected GenericRequest
Parsing result: You gain 32 Adventures
You gain 32 Adventures
Processing result:  Advs Used: 32
Parsing result: You gain 63 Muscleboundness
You gain 63 Muscleboundness
Processing result:  Substats: 63 / 0 / 0
Parsing result: You gain 20 Mana Points
You gain 20 Mana Points
Processing result:  MP: 20
You lose some of an effect: Got Milk
Processing result: spaghetti with Skullheads (-1)
--- processResults() from the original UseItemRequest
Processing result: Got Milk (9)
Processing result: spaghetti with Skullheads (-1)
 
Top