Difference between revisions of "Template:Recipe fetch"

From Captain of Industry Wiki
Jump to: navigation, search
(made the intro's headers)
(add `isbldg` param to allow output on building pages)
Line 3: Line 3:


{{#cargo_query: tables=recipes
{{#cargo_query: tables=recipes
| fields = _pageName=Building,
| fields = _pageName = Building,
            Input1Name, Input1Qty, Input2Name, Input2Qty, Input3Name, Input3Qty,
          Input1Name, Input1Qty, Input2Name, Input2Qty, Input3Name, Input3Qty,
            Input4Name, Input4Qty, Input5Name, Input5Qty, Input6Name, Input6Qty,
          Input4Name, Input4Qty, Input5Name, Input5Qty, Input6Name, Input6Qty,
            Time,
          Time,
            Output1name, Output1Qty, Output2Name, Output2Qty, Output3Name, Output3Qty,
          Output1name, Output1Qty, Output2Name, Output2Qty, Output3Name, Output3Qty,
            Output4Name, Output4Qty, Output5Name, Output5Qty, Output6Name, Output6Qty
          Output4Name, Output4Qty, Output5Name, Output5Qty, Output6Name, Output6Qty


| where =  
| where =  
{{#if: {{{isbldg|}}} | _pageName = "{{PAGENAME}}" |
   {{#ifeq: {{lc:{{{dir|}}}}} | in |
   {{#ifeq: {{lc:{{{dir|}}}}} | in |
     Input1Name = "{{#var:ingred}}" OR Input2Name = "{{#var:ingred}}" OR Input3Name = "{{#var:ingred}}"
     Input1Name = "{{#var:ingred}}" OR Input2Name = "{{#var:ingred}}" OR Input3Name = "{{#var:ingred}}"
Line 19: Line 21:
       OR Output4Name = "{{#var:ingred}}" OR Output5Name = "{{#var:ingred}}" OR Output6Name = "{{#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}}"
         {{#ifeq: {{lc:{{{dir|}}}}} | both |
        OR Input4Name = "{{#var:ingred}}" OR Input5Name = "{{#var:ingred}}" OR Input6Name = "{{#var:ingred}}"
          Input1Name = "{{#var:ingred}}" OR Input2Name = "{{#var:ingred}}" OR Input3Name = "{{#var:ingred}}"
        OR Output1name = "{{#var:ingred}}" OR Output2Name = "{{#var:ingred}}" OR Output3Name = "{{#var:ingred}}"
          OR Input4Name = "{{#var:ingred}}" OR Input5Name = "{{#var:ingred}}" OR Input6Name = "{{#var:ingred}}"
        OR Output4Name = "{{#var:ingred}}" OR Output5Name = "{{#var:ingred}}" OR Output6Name = "{{#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==}} }}
| intro = {{#ifeq: {{lc:{{{dir|}}}}} | in | ==Consumption== | {{#ifeq: {{lc:{{{dir|}}}}} | out | ==Production==}} }}

Revision as of 09:33, 29 January 2022