New Content - Implemented r15122 - spaghetti con calaveras not consumable in a standard acension

Magus_Prime

Well-known member
I realize that mafia doesn't handle the new standard ascension path yet but I found two problems with mafia's handling of the standard path this morning: some food and drink aren't consumable under the new Type 69 restrictions.

1. Mafia doesn't know which consumables aren't usable
2. When I tried and failed to consume a forbidden consumable via the relay browser the failure message wasn't recognized and my fullness increased

I made a spaghetti con calaveras and tried to consume it via the item manager.

Code:
Eating 2 spaghetti con calaveras...
Finished eating 2 spaghetti con calaveras.

But my fullness did not increase. Trying to consume spaghetti con calaveras via the relay browser yielded "That item is too old to be used on this path.".

That failed consumption via the relay browser increased my fullness in KoLmafia.

I have no idea what other consumables fall under the restriction.
 
Last edited:
1. Mafia doesn't know which consumables aren't usable
> ash is_unrestricted( $item[ Salsa de las Epocas ] )

Returned: false

> ash is_unrestricted( $item[ spaghetti con calaveras ] )

Returned: false
Oh, we clearly know which items aren't usable. After all, they are on the type69 list.

2. When I tried and failed to consume a forbidden consumable via the relay browser the failure message wasn't recognized and my fullness increased.
...
Trying to consume spaghetti con calaveras via the relay browser yielded "That item is too old to be used on this path.".
We obviously can't stop you from making and (attempting to) use items in the Relay Browser. So, yes, in that case, we should recognize the failure.

I made a spaghetti con calaveras and tried to consume it via the item manager.
I see both Salsa de las Epocas and spaghetti con calaveras in the "Creatable" section of the item manager.
I see spaghetti con calaveras in the Usable/Food section of the item manager.

I'm not sure if we should filter restricted items in the Creatable section; it is not illegal to MAKE them (as you discovered), just to USE them. If we filter there, I expect there will ultimately be bug reports from people saying "How come KoLmafia wouldn't let me make items to put in my store?"

However, we certainly should filter out restricted items in the Usable section.

I have no idea what other consumables fall under the restriction.
KoL does - and, therefore, so does KoLmafia. We don't need a hardcoded list of such, KoL itself gives us the list.
 
Try r15123 for recognising the failure message.
I've not looked much at the Type69 code, but my understanding is that Mafia doesn't maintain a list of Type69 usable items, KoL does, and Mafia then reads that list. However, I see that item on the list, so not sure what is going on there.

Edit - got distracted before posting this, so beaten to most by Veracity.
 
Last edited:
Revision 15124 filters out currently restricted items in the Usables section of the Item Manager
 
Veracity pinpointed the core issue, at least from my point of view, by filtering the Usables section in the Item Manager.

Another approach would have been to mark it as unusable in Item Manager. If I'd seen that I would have tried to figure out why. Thank you!
 
Thanks! Of course, Darzil did a necessary part of this by not upping fullness if you fail to use the item in the Relay Browser. (For future reference, clicking on the "refresh" icon on the bottom of the green sidepane in the GUI will submit api.php and reset your fullness to what KoL says.)
 
Back
Top