Bug - Fixed Peppermint twists, eau, clusters not marked crafting ingredients

Erosion

Member
When I was trying to figure out why FREE BEER kept rejecting peppermint and Dread drinks, I noticed that peppermint twist wasn't marked with a [mix].

Trying to send ingredients to myself, it turns out neither eau de mort nor clusters were, either.

http://i.imgur.com/cGAhapi.png
http://i.imgur.com/y074oIV.png

I did some more poking around, and it turns out that when an item can be used multiple ways (crafting or just potion / craft), Mafia doesn't give you any options.

http://i.imgur.com/ygrYnaV.png

However, tangerines and many other ingredients seem to mix fine.

Is there something on the back end preventing these from being recognized as mixable items?

Updating inventory...
Got 1 bottle of Domesticated Turkey, 1 kumquat from tHE eROsIoNseEker.
cocktail bottle of Domesticated Turkey + kumquat = whiskey bittersweet
You acquire an item: whiskey bittersweet
Mixed 1 whiskey bittersweet.
Deleting processed mail...
1 message deleted.
Requests complete.

Updating inventory...
Got 1 eau de mort, 1 stench cluster from tHE eROsIoNseEker.
Mixed 1 eau de mort, 1 stench cluster.
Deleting processed mail...
1 message deleted.
Requests complete.
 

heeheehee

Developer
Staff member
Mafia doesn't explicitly know if an item is a cocktailcrafting ingredient or not. It does, however, have recipes in concoctions.txt for the eau de mort drinks as well as the peppermint twist drinks. Does your session log say anything about trying to craft items?

CLI said:
> ash craft("cocktail", 1, $item[peppermint twist], $item[bottle of gin])

You acquire an item: Gin Mint
Returned: 1

session log said:
Mix 1 peppermint twist + 1 bottle of gin
You acquire an item: Gin Mint
Crafting used 1 each of bottle of gin and peppermint twist
 

Veracity

Developer
Staff member
Looks like we don't give a mix or cook link for fancy concoctions. That would be a bug.

However, I don't understand why KoLmafia's presence of lack of a use link in the Relay Browser would have anything whatsoever to do with why your script decides to mix ingredients into a drink.

I see this:

Got 1 bottle of Domesticated Turkey, 1 kumquat from tHE eROsIoNseEker.
cocktail bottle of Domesticated Turkey + kumquat = whiskey bittersweet
You acquire an item: whiskey bittersweet
Mixed 1 whiskey bittersweet.

What, exactly, prints the line starting with "cocktail"?

I also see:

Got 1 eau de mort, 1 stench cluster from tHE eROsIoNseEker.
Mixed 1 eau de mort, 1 stench cluster.

That does not have the "cocktail" line nor the "You acquire an item" line, which would seem to indicate that your script did not actually attempt to make the drink.

What is your code that decides what drink you can make with a particular set of ingredients (and therefore, presumably, prints the "cocktail" line) and then, presumably, uses a "craft" or "create" command of some sort to actually do the mixing?
 

Veracity

Developer
Staff member
Revision 16607 will let "fancy" ingredients get a [cook] or [mix] use link. Note that if the ingredient is otherwise usable or consumable, only a [use] or [eat] link will be shown; we do not ALSO add a creation link. We could, but that would be a New Feature.

This certainly does not address the reason that your bot is deciding not to actually mix fancy cocktails. Especially since a peppermint twist, for example, will still not get a [mix] link since it gets a [use] link.

As I said, you'll have to show us the section of your script that decides whether or not to mix a drink, if you want us to help you with that issue.
 

Veracity

Developer
Staff member
Code:
void parse_recipes() {
    item [string, string, item] r;
    file_to_map("concoctions.txt", r);
    foreach target, str, src1, src2 in r {
        if (str == "MIX" || str == "ACOCK" || str == "SCOCK") {
            RECIPES["cocktail", src1, src2] = target;
        }
    }
}
You need to include MIX_FANCY recipes.

And I guess that Use Links should also allow ACOCK and SCOCK for creation links.
 
Top