Bug - Fixed crafting AND drinking wax booze in a single action issue in item manager

taltamir

Member
If you use the item management to craft and consume wax booze in a single action, it will not be able to find items you had just crafted.

For example, telling it to consume 7 wax booze with 3 already crafted in inventory results in consuming 3, creating 4, and then giving the error it can't be found 3 times (for some reason you get 1 less error than items)
Closing and opening item manager again, 4 crafted wax booze showed up and were drank successfully on the second attempt
Presumably the same thing happens with the other wax consumables? although I haven't tested that yet.
Drinking 3 wax booze...
You gain 10 Adventures
You gain 24 Strongness
You gain 20 Mysteriousness
You gain 28 Cheek
You acquire an effect: Waxing (30)
You gain 2 Drunkenness
You lose some of an effect: Ode to Booze (-2)
You gain 11 Adventures
You gain 21 Muscleboundness
You gain 22 Enchantedness
You gain 28 Roguishness
You acquire an effect: Waxing (30)
You gain 2 Drunkenness
You lose some of an effect: Ode to Booze (-2)
You gain 11 Adventures
You gain 22 Strongness
You can now equip a cursed eyepatch (and possibly other things).
You gain a Muscle point!
You gain 20 Magicalness
You gain 22 Roguishness
You acquire an effect: Waxing (30)
You gain 2 Drunkenness
You lose some of an effect: Ode to Booze (-2)
Finished drinking 3 wax booze.
Verifying ingredients for wax booze (4)...
Creating 4 wax booze...
You acquire an item: wax booze
Successfully created wax booze (1)
You acquire an item: wax booze
Successfully created wax booze (1)
You acquire an item: wax booze
Successfully created wax booze (1)
You acquire an item: wax booze
Successfully created wax booze (1)
You don't have that item.
You don't have that item.
You don't have that item.

another test, had 0 crafted. tried to make and drink 7. got this result
Verifying ingredients for wax booze (7)...
Creating 7 wax booze...
You acquire an item: wax booze
Successfully created wax booze (1)
You acquire an item: wax booze
Successfully created wax booze (1)
You acquire an item: wax booze
Successfully created wax booze (1)
You acquire an item: wax booze
Successfully created wax booze (1)
You acquire an item: wax booze
Successfully created wax booze (1)
You acquire an item: wax booze
Successfully created wax booze (1)
You acquire an item: wax booze
Successfully created wax booze (1)
You don't have that item.
You don't have that item.
You don't have that item.
You don't have that item.
You don't have that item.
You don't have that item.
closing and opening the item manager worked, and I was then able to drink them via item manager after doing so.

So you can use the item manager so long as you do it in two actions. first to craft, then refresh the inventory, then to drink.
I believe there is some sort of issue with the wax crafting page not correctly updating the mafia inventory tracking with the items it created?
 
Last edited:

Veracity

Developer
Staff member
There is surely a one-line fix somewhere to make the "WAX" crafting method update inventory correctly on a successful creation.
I am sure it has nothing to do with "crafting and drinking in the same action", since it is a failure in the "crafting" leaving the inventory count incorrect.
Which is to say, it should be easily reproducible (and hence fixable) simply via crafting and examining inventory.
Which is good, since I, personally, have no intention of "consuming" wax booze any time soon. ;)
 

taltamir

Member
Not since r18632, which you had indicated had fixed the previous issue you had.
Sorry, i was trying to be humorous. I have been reading the patch notes for every patch and indeed did not see any mention of forcing a refresh after crafting wax drinks. So I don't know why it started working all of a sudden.
 

taltamir

Member
It happened again

Code:
Verifying ingredients for wax booze (2)...
Creating 2 wax booze...
You     acquire an item: wax booze
Successfully created wax booze (1)
You     acquire an item: wax booze
Successfully created wax booze (1)
[COLOR=red]You     don't have that item.[/COLOR]

I think this might be related to the quantity.
make 3 and drink 7 - it happened
make 7 and drink 7 - it happened
make 12 and drink 12 - no problem detected (was sneaky pete with 34 liver)
make 10 and drink 10 - no problem detected (was sneaky pete with 34 liver, but was aiming to get to exactly 20 drunkness)
make 2 and drink 2 - it happened (same day as above)
 

Veracity

Developer
Staff member
Revision 18765 should fix this.

We were deducting an ingredient both in ChoiceManager.postChoice2 and in WaxGlobRequest.parseResponse, which was called to handle the results of that choice.

burning newspaper concoction creation was copied from that same file, it seems, so had the same issue.

I also fixed both of those to "use" the item once (which enters choice.php) and then repeatedly take the requested choice, skipping the use + redirect for subsequent creations.
 

taltamir

Member
Thanks for the patch, so far it seems to work (it was an intermittent problem before, so I will keep on testing it)
 
Top