Difference between revisions of "Template:Recipe fetch"
From Captain of Industry Wiki
Thadius856 (talk | contribs) m (typo) |
Thadius856 (talk | contribs) (attempt to segregate production and consumption recipes based on the dir param value received) |
||
Line 1: | Line 1: | ||
{{#if: {{NAMESPACE}} || | {{#if: {{NAMESPACE}} || | ||
{{#vardefine: | {{#vardefine: ingred | {{{1|{{PAGENAME}}}}} }} | ||
{{#cargo_query: tables=recipes | {{#cargo_query: tables=recipes | ||
| fields = _pageName=Building, | | fields = _pageName=Building, | ||
Line 9: | Line 10: | ||
Output4Name, Output4Qty, Output5Name, Output5Qty, Output6Name, Output6Qty | Output4Name, Output4Qty, Output5Name, Output5Qty, Output6Name, Output6Qty | ||
| where = Input1Name = "{{#var: | | where = | ||
{{#ifeq: {{lc:{{{dir|}}}}} | in | | |||
Input1Name = "{{#var:ingred}}" OR Input2Name = "{{#var:ingred}}" OR Input3Name = "{{#var:ingred}}" | |||
OR Input4Name = "{{#var:ingred}}" OR Input5Name = "{{#var:ingred}}" OR Input6Name = "{{#var:ingred}}" | | |||
{{#ifeq: {{lc:{{{dir|}}}}} | out | | |||
Output1name = "{{#var:ingred}}" OR Output2Name = "{{#var:ingred}}" OR Output3Name = "{{#var:ingred}}" | |||
OR Output4Name = "{{#var:ingred}}" OR Output5Name = "{{#var:ingred}}" OR Output6Name = "{{#var:ingred}}" | | |||
Input1Name = "{{#var:ingred}}" OR Input2Name = "{{#var:ingred}}" OR Input3Name = "{{#var:ingred}}" | |||
OR Input4Name = "{{#var:ingred}}" OR Input5Name = "{{#var:ingred}}" OR Input6Name = "{{#var:ingred}}" | |||
OR Output1name = "{{#var:ingred}}" OR Output2Name = "{{#var:ingred}}" OR Output3Name = "{{#var:ingred}}" | |||
OR Output4Name = "{{#var:ingred}}" OR Output5Name = "{{#var:ingred}}" OR Output6Name = "{{#var:ingred}}" }} }} | |||
| intro = {{#ifeq: {{lc:{{{dir|}}}}} | in | Consumption | {{#ifeq: {{lc:{{{dir|}}}}} | out | Production}} }} | |||
| format = template | | format = template | ||
| template = Recipe draw | | template = Recipe draw |