Bug - Fixed Travoltan trousers stay equipped after fishing for trinkets

antimarty

Member
If I tell mafia e.g. "hermit 10 seal" it will equip the travoltan pants to save on gum purchases, but doesn't restore the previous pants when it's done.

A minor thing, but an issue for me because I'm typically using seal fights to charge up the pantsgivings or cheese diapers.
 
Re-equip your previous pants when auto-equipping Travoltan Trousers for purchases

I just got myself a pair of Travoltan Trousers yesterday, and before rollover, I bought some clovers (via the fish for worthless item link). What I didn't know was that when Mafia auto-equips the trousers when purchasing gum, it keeps them on, so I ended up losing 10 adventures from my rollover pants. Can this be set to auto re-equip your previous pants after doing a purchase?
 
Huh. It's always worked that way (equip previous pants) for me. Although, I can't say I have ever done it via the Relay Browser; a simple "breakfast" in the CLI will get all of the day's clovers for me.
 
Mafia is supposed to reequip your previous pants. I'm pretty sure it's due to doing something besides purchasing, in this case using hermit permits, that causes pants to not be switched back.
 
Huh. It's always worked that way (equip previous pants) for me. Although, I can't say I have ever done it via the Relay Browser; a simple "breakfast" in the CLI will get all of the day's clovers for me.

Ah, I've only used the relay for clovers. Here's what it has in the gcli when i click fish for worthless item:

Pulling items from storage...
Putting on Travoltan trousers...
Equipment changed.
Purchasing chewing gum on a string (1 @ 47)...
You spent 47 Meat
You acquire an item: chewing gum on a string
Purchases complete.
Using 1 chewing gum on a string...
You acquire an item: worthless trinket
Finished using 1 chewing gum on a string.

Then it keeps the pants on
 
Hm. I don't see any code in Mafia that re-equips your previous pants. Maybe it's done implicitly by the checkpointing and whatnot (edit: in breakfast)?
 
Oh, I see. Checkpointing is done in textui/command/BuyCommand (and various other commands to avoid doing so while trying to do MP restoration), while outfit switching is done in request/NPCRequest.
 
I very recently acquired a pair of Travoltan Trousers (They're much cheaper than a Mr. Accessory now!) so I have no idea if this behavior is new or has existed for a long time.

When I click the "Go Fish" button on my Hermit coinmaster, the trousers are automatically equipped (which is wonderful) and then after I get the trinket, the Travoltan Trousers stay equipped. My original pants are not restored.
 
Looking back at old commits:
* r13343 (committed by Veracity) adds checkpointing to MCDRequest so Mafia doesn't get stuck wearing travoltan trousers after buying a detuned radio.
* r2754 (committed by hola) adds the switching to trousers for NPC purchases (nothing about switching back).

I can't tell if this is intended behavior or not. Certainly one option would be to move the checkpointing into NPCPurchaseRequest itself (checkpoint and set an internal variable if we decide to change gear; restore and reset said variable after parsing the response). This might lead to more server requests in certain cases (e.g. user doesn't have Travoltan trousers equipped, buys chewing gum to fish for items one at a time).
 
Back
Top