Template:GetRecipesUsing: Difference between revisions

Jump to navigation Jump to search
Fixes ingredients matching any ingredient with that string in them. Example: "stone" matching "stone arrow"
(Created page with "<includeonly><!-- // Define the full array of possible recipes -->{{#ask:Recipe::+|?Recipe=|format=array|name=$recipes}}<!-- // Reset the firstout variable -->{{#vardefine...")
 
(Fixes ingredients matching any ingredient with that string in them. Example: "stone" matching "stone arrow")
Line 29: Line 29:
         -->{{#arrayprint:$searchingr||@searchingr@|<!--
         -->{{#arrayprint:$searchingr||@searchingr@|<!--
           // If recipe is already valid or ingredient contains the search ingredient, set validrecipe variable to 1
           // If recipe is already valid or ingredient contains the search ingredient, set validrecipe variable to 1
           -->{{#ifeq:{{#expr:{{#if:{{#var:$validrecipe}}|1|0}} or {{#if:{{#pos:@ingredient@|@searchingr@}}|1|0}}}}|1|{{#vardefine:$validrecipe|1}}}}<!--
           -->{{#ifeq:{{#expr:{{#if:{{#var:$validrecipe}}|1|0}} or {{#ifeq:@ingredient@|@searchingr@|1|0}}}}|1|{{#vardefine:$validrecipe|1}}}}<!--
         // End printing of each search ingredient
         // End printing of each search ingredient
         -->}}<!--
         -->}}<!--

Navigation menu