Feature - Implemented Greatest American Pants

Evil Kitten

New member
Could it be added not to change out of them when you have their buffs active? I just used mafia to craft while having one active and it equipped my Travoltan Pants to buy stuff for crafting therefore removing the buff.
 

lostcalpolydude

Developer
Staff member
Here is a patch that checks to see if you have any of the effects and if you have a setting gapProtection set to true, and if so it will prevent you from switching to an outfit for NPC purchases and also prevent travoltan trousers equipping. This probably needs some tidying up, and I could see a popup window asking if you want to continue rather than just failing, and defaults.txt needs the preference in a final version, but this is the basic logic to get started with at least. If there are ever outfits needed for buying stuff that don't use pants, then the code will need to become more complicated.

The only other time mafia should change your equipment without it following a specific command is to equip -MP gear. I believe the only -MP stuff that uses the pants slot is a hobopolis outfit, and mafia only uses -MP stuff in ronin/HC, so that should not be an issue.
 

Attachments

  • gap.diff
    2 KB · Views: 30
Greatest American Pants and Travoltan Trousers Synergy

If you have the GAP pants equipped and activated with one of the buffs, please don't let mafia equip the travoltan trousers when buying restoratives.
 

Theraze

Active member
Did gapProtection ever get set to true for default? The patch says that it needed to be set at some point in the future.
 

lostcalpolydude

Developer
Staff member
You have to "set gapProtection = true" for that to do anything. Since I forgot to include gapProtection being added to defaults.txt in that patch (a quick-fix bug) and there's no GUI option for setting it (I don't know anything about that code really, so I wouldn't have tried it even if I wanted it), it can easily be overlooked.

Maybe that setting should default to true to prevent occasional reports like this, but then there would need to be a GUI option to turn it off I think.

Edit: And there's the ninja. But it was intended to be off by default when I wrote it...
 

lostcalpolydude

Developer
Staff member
You won't find it because my patch didn't add it to defaults.txt. There is code to check for that setting though, and since it isn't set it's treated the same as being false.
 
I found this setting in the new build, thanks. Note that it was still defaulted to false, but knowing that it existed, I was able to change it using Preference Manager. Thanks.

And it works flawlessly.
Code:
> buy 10 soda water

Searching for "soda water"...
Search complete.
Putting on Travoltan trousers...
Equipment changed.
Purchasing soda water (10 @ 66)...
You acquire soda water (10)
You spent 660 Meat
Purchases complete.
Putting on Greatest American Pants...
Equipment changed.

> gap vision

Superpower time!
You acquire an effect: Super Vision (duration: 20 Adventures)

> buy 10 soda water

Searching for "soda water"...
Search complete.
Purchasing soda water (10 @ 70)...
You acquire soda water (10)
You spent 700 Meat
Purchases complete.
 
Last edited:
Top