Difference between revisions of "Template:Recipe fetch"

From Captain of Industry Wiki
Jump to: navigation, search
(Thadius856 moved page Template:Recipe fetch to Template:Recipe draw: splitting again for cargo compat)
Tag: New redirect
 
(basic variable-based query for recipes given an ingredient)
Tag: Removed redirect
Line 1: Line 1:
#REDIRECT [[Template:Recipe draw]]
{{#if: {{NAMESPACE}} ||
{{#vardefine: criteria | {{{1|{{PAGENAME}}}}} }}
{{#cargo_query: tables=recipes
| fields = _pageName=Building,
            Input1Name, Input1Qty, Input2Name, Input2Qty, Input3Name, Input3Qty,
            Input4Name, Input4Qty, Input5Name, Input5Qty, Input6Name, Input6Qty,
            Time,
            Output1name, Output1Qty, Output2Name, Output2Qty, Output3Name, Output3Qty,
            Output4Name, Output4Qty, Output5Name, Output5Qty, Output6Name, Output6Qty
 
| where = Input1Name = "{{#var:criteria}}" OR Input2Name = "{{#var:criteria}}" OR Input3Name = "{{#var:criteria}}"
      OR Input4Name = "{{#var:criteria}}" OR Input5Name = "{{#var:criteria}}" OR Input6Name = "{{#var:criteria}}"
      OR Output1name = "{{#var:criteria}}" OR Output2Name = "{{#var:criteria}}" OR Output3Name = "{{#var:criteria}}"
      OR Output4Name = "{{#var:criteria}}" OR Output5Name = "{{#var:criteria}}" OR Output6Name = "{{#var:criteria}}"
 
| format = template
| template = Recipe fetch
| named args = yes
}}
}}

Revision as of 08:38, 29 January 2022