Difference between revisions of "Template:Recipe List Row"
Jump to navigation
Jump to search
m |
(simplification) |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
|- style="text-align:left;" | |- style="text-align:left;" | ||
− | ! style="text-align:left;" | {{#if:{{#vardefineecho:amount|{{Q|{{{?Name}}}|Product Amount}}}}|{{#var:amount}}× }}{{Icon Small|{{{?Name}}} }} [[{{{?Name}}}]]{{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Ideology (DLC)|{{IdeologyIcon}}}} {{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Royalty (DLC)|{{RoyaltyIcon}}}} | + | ! style="text-align:left;" data-sort-value="{{{?Name}}}" | {{#if:{{#vardefineecho:amount|{{Q|{{{?Name}}}|Product Amount}}}}|{{#var:amount}}× }}{{#vardefineecho:header|{{Icon Small|{{{?Name}}} }} [[{{{?Name}}}]]{{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Ideology (DLC)|{{IdeologyIcon}}}} {{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Royalty (DLC)|{{RoyaltyIcon}}}}}} |
− | | data-sort-value="{{#expr: {{{ | + | | data-sort-value="{{#vardefineecho:cumulatedAmount|{{#expr:{{{R1a}}}{{#if:{{{R2a}}}|+{{{R2a}}}}}{{#if:{{{R3a}}}|+{{{R3a}}}}}{{#if:{{{R4a}}}|+{{{R4a}}}}}{{#if:{{{R5a}}}|+{{{R5a}}}}}{{#if:{{{R6a}}}|+{{{R6a}}}}}}}}}" | {{Required Resources|{{{?Name}}}|sep= +|simple=1}} |
− | | {{#ifexpr: {{#vardefineecho:work|{{#expr:{{formatnum:{{{?Work}}}|R}}}}{{# | + | | {{#ifexpr: {{#vardefineecho:work|{{#expr:{{formatnum:{{{?Work}}}|R}}}}/{{#vardefine:efficiency|{{Q|{{#var:name}}|Efficiency}}}}{{#var:efficiency|1}}}} < 10 | {{0|000,00}} | {{#ifexpr: {{#var:work}} < 100 | {{0|000,0}} | {{#ifexpr: {{#var:work}} < 1000 | {{0|000,}} | {{#ifexpr: {{#var:work}} < 10000 | {{0|00}} | {{#ifexpr: {{#var:work}} < 100000 | {{0}} }} }} }} }} }}{{Ticks|{{#var:work}} }} |
| [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }}<!-- | | [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }}<!-- | ||
-->{{#if: {{#vardefineecho:amountBulk|{{Q|{{{?Name}}}|Bulk Product Amount}}}} | | -->{{#if: {{#vardefineecho:amountBulk|{{Q|{{{?Name}}}|Bulk Product Amount}}}} | | ||
<tr style="text-align:left;"> | <tr style="text-align:left;"> | ||
− | ! style="text-align:left;" | + | ! style="text-align:left;" data-sort-value="{{{?Name}}}" {{!}} {{#var:amountBulk}}× {{#var:header}} |
− | {{!}} data-sort-value="{{#expr: | + | {{!}} data-sort-value="{{#expr:{{#var:cumulatedAmount}}*{{#var:amountBulk}}/{{#var:amount|1}} }}" {{!}} {{Required Resources|{{{?Name}}}|sep= +|simple=1|{{#var:amountBulk}}/{{#var:amount|1}}}} |
− | {{!}} {{#ifexpr: {{#vardefineecho:work|{{#expr:{{formatnum:{{{?Work}}}|R}}}} | + | {{!}} {{#ifexpr: {{#vardefineecho:work|{{#expr:{{formatnum:{{{?Work}}}|R}}}}/{{#var:efficiency|1}}*{{#var:amountBulk}}/{{#var:amount|1}} round 0}} < 10 | {{0|000,00}} | {{#ifexpr: {{#var:work}} < 100 | {{0|000,0}} | {{#ifexpr: {{#var:work}} < 1000 | {{0|000,}} | {{#ifexpr: {{#var:work}} < 10000 | {{0|00}} | {{#ifexpr: {{#var:work}} < 100000 | {{0}} }} }} }} }} }}{{Ticks|{{#var:work}} }} |
{{!}} [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }} | {{!}} [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }} | ||
}}</tr> | }}</tr> | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
{{Documentation}}</noinclude> | {{Documentation}}</noinclude> |
Revision as of 21:23, 19 September 2022
This template is only ever called as part of Template:Recipe List . It uses the variables provided by the different #asks in that template to create sections of the table that the primary template then assembles into one table.
Example usage
This template isn't designed to be used in isolation, so as an example we'll show {{Recipe List|Fabrication bench}}
And {{Recipe List|Fueled smithy}}
The above documentation is transcluded from Template:Recipe List Row/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |