Bureaucrats, Interface administrators, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Suppressors, Administrators
3,322
edits
Tag: Undo |
(Fixes ingredients matching any ingredient with that string in them. Example: "stone" matching "stone arrow") |
||
Line 28: | Line 28: | ||
// Start printing of each ingredient to search for | // Start printing of each ingredient to search for | ||
-->{{#arrayprint:$searchingr||@searchingr@|<!-- | -->{{#arrayprint:$searchingr||@searchingr@|<!-- | ||
// If recipe is already valid or ingredient | // If recipe is already valid or ingredient is equal to the search ingredient, set validrecipe variable to 1 | ||
-->{{#ifeq:{{#expr:{{#if:{{#var:$validrecipe}}|1|0}} or {{# | // We have to explode and get the first part of ingredient by ";", because that's how the name and amount is divided up | ||
-->{{#ifeq:{{#expr:{{#if:{{#var:$validrecipe}}|1|0}} or {{#ifeq:{{#explode:@ingredient@|;|0}}|@searchingr@|1|0}}}}|1|{{#vardefine:$validrecipe|1}}}}<!-- | |||
// End printing of each search ingredient | // End printing of each search ingredient | ||
-->}}<!-- | -->}}<!-- |