Bug - Not A Bug Ingredient function returning wrong information

Theraze

Active member
> ash count(get_ingredients($item[painful penne pasta]))

Returned: 0

> recipe painful penne pasta

painful penne pasta: [Cooking (fancy) (Pastamastery)] dry noodles + jabañero pepper
***dry noodles
***jabañero pepper: [Coin Master purchase] worthless item
******worthless item
Obviously painful penne pasta has more than 0 ingredients - it should find 2. I discovered this while trying to iterate over ingredients to check for sauces for Saucemaven support in ED... it's very hard to check for ingredients with 'sauce' in the name if you can't retrieve the ingredients. :)

Edit: Just checked and this may only apply to items that you don't have the skills to create, as cocktailcrafting items are showing just fine on this AoSP character:
> ash get_ingredients($item[ducha de oro])

Returned: aggregate int [item]
little paper umbrella => 1
tequila sunrise => 1

> ash get_ingredients($item[painful penne pasta])

Returned: aggregate int [item]
But since in SC, you can still buy those items, the ingredients that create the items make a difference in which skills trigger... :) Not for the AoSP, but I'd like to know that functions work the same regardless of which character is checking things.
 
Last edited:

Darzil

Developer
Edit: Just checked and this may only apply to items that you don't have the skills to create, as cocktailcrafting items are showing just fine on this AoSP character:But since in SC, you can still buy those items, the ingredients that create the items make a difference in which skills trigger... :) Not for the AoSP, but I'd like to know that functions work the same regardless of which character is checking things.

Looks like it does, as ash count(get_ingredients($item[painful penne pasta])) gives me 2.

Also, from the wiki documentation:
Returns an empty map for items that cannot be created at the moment, taking into account gender, skills, adventures remaining, tools in inventory, current date, and access to certain forms of crafting (e.g. Crimbo Town).
 

edgy

Member
It's worth noting that the CLI equivalent to get_ingedients() works for characters with no skills:
Code:
> ingredients hot hi mein

hot hi mein: delectable catalyst (0/1), dry noodles (0/1), hot nuggets, MSG (0/1), scrumptious reagent (0/1)
 

Theraze

Active member
Same goes for recipe, as I listed above.

Any chance we can overload get_ingredients to give us an option to return the ingredients regardless of other factors? Having the CLI commands give different results than the ASH command seems odd.
 
Top