Bug - Fixed use sewing kit tracking issue

taltamir

Member
The sewing kit can only be purchased if you don't already have one in your inventory (if you hangk, display case, and closet don't count, so you can use those to buy more than one).
Additionally, the sewing kit is a reusable item that can be used once per day.

using the CLI command
Code:
use sewing kit;
when the sewing kit was already used today, results in mafia trying and failing to buy an additional sewing kit.
Code:
[COLOR=olive]> use sewing kit;[/COLOR]

Verifying     ingredients for sewing kit (1)...
Purchasing sewing kit (1 @ 1 fat loot     token)...
Visiting the Vending Machine...
Vending Machine     successfully looted!
[COLOR=red]Creation failed, no results     detected.[/COLOR]
[COLOR=black]You have the latest     vars_documentation.txt. Will not check again today.[/COLOR]

I think a _sewingkitused variable should be added to track whether or not sewing kit was used today. And a special handling case be added to use command for sewing kit to handle its used status as well as acquisition (no point in trying and failing to buy one if you already have one in inventory)
 

Darzil

Developer
It should be made reusable (as well as adding the tracking), so that it is not removed at all by using it.
 

Saklad5

Member
Thanks! I was actually planning to submit a patch for this next. I've been fairly busy with non-KoLmafia things, though, so I never got around to it.
 

Ezandora

Member
restores.txt should change the sewing kit entry to:
Code:
sewing kit	item	1000	1000	0	0	0	[1-pref(_sewingKitUsed)]
 
Top