
Originally Posted by
Niwashi
The "Recipe Search" and "Search for item by Crafting Method" features can already do this. If you look up the recipe for making an Iron Ingot, for instance, it will show you both the level 13 Armourer recipe for making it and also the level 16 Blacksmith recipe for making it.
Ah, that's right. So it's not unprecedented at all. I don't see any reason why this would be difficult for developers to do, then; it basically amounts to a simple search, unless their recipes have been constructed in a needlessly convoluted way...
Code:
foreach (recipe in full_list_of_recipes)
{
var found_ingredient = false
foreach (ingredient in recipe.ingredient_list)
{
if (ingredient equals search_ingredient)
{
found_ingredient = true
breakloop
}
}
if (found_ingredient equals true)
{
display_list.add(recipe)
}
}