Bug - Fixed Mafia and KoL disagree on equipment when an "outfit last" call fails

Ryo_Sangnoir

Developer
Staff member
When an "outfit last" call fails, KoL equips as many items as it can (and tells you which it couldn't), but it seems that Mafia doesn't change the outfit at all internally, judging by the ***s.

Code:
> outfit last

Putting on outfit: Your Previous Outfit
You only put on part of that outfit.
*** slot hat: KoL has murderbot mask but KoLmafia has smooth velvet hat
*** slot back: KoL has Buddy Bjorn but KoLmafia has octolus-skin cloak
*** slot shirt: KoL has origami pasties but KoLmafia has smooth velvet shirt
*** slot acc2: KoL has Mr. Screege's spectacles but KoLmafia has smooth velvet pocket square
*** slot acc3: KoL has gold detective badge but KoLmafia has smooth velvet socks
 

Veracity

Developer
Staff member
It "tells you which it couldn't" is good - but does it also "tell you which it could"?

Considering that KoLmafia has no way to know what is in "outfit last", it doesn't help us when KoL says "we did not put on these pieces of equipment (that you didn't know about)" but did does not say "we did put on these pieces of equipment (that you didn't know about".

Every other outfit, we know what is in it. "Your last outfit" - nope.

The *** messages are printed when api.php tells us - for the first time - which pieces of equipment KoL DID put on.
 

lostcalpolydude

Developer
Staff member
So KoL does tell you what it equipped. And KoLmafia does handle it properly - if you switch in the relay browser. For outfit switching using "outfit last", the message "You put on part of an Outfit" prevents any parsing of the rest of the response, apparently.
 

lostcalpolydude

Developer
Staff member
I think checking for that message can just be completely removed. So much of that code has changed that it probably no longer serves its purpose.
 
This is actually a general case, not specific to outfit last: if you tell kol directly to /outfit whatever it will equip what it can, while mafia will throw an error if you don't have access to one of the items and do nothing. Its why most of my scripts use cli_execute(/outfit), that way, I don't end up annoyed every time it tries to equip an outfit with my stinky cheese something (but not the something I currently have), and it lets me use all the other pieces of the outfit.
 

lostcalpolydude

Developer
Staff member
17947 removes the check that triggered the error. That should fix it, and probably doesn't break anything else.
 
Top