Difference between revisions of "Template:Ingredient List Row"

From RimWorld Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
<includeonly>{{#ifexist:{{{?Name}}}|
+
<includeonly>
<tr>
+
|-
! [[{{{?Name}}}]]{{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Ideology (DLC)|{{IdeologyIcon}}}} {{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Royalty (DLC)|{{RoyaltyIcon}}}}
+
{{#ifexist:{{{?Name}}}|
<td> <!--
+
! [[{{{?Name}}}]]{{#switch: {{Q|{{{?Name}}}|From DLC}}
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 1}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 1 Amount}}|<!--
+
| Ideology (DLC) = {{IdeologyIcon}}
 +
| Royalty (DLC) = {{RoyaltyIcon}}
 +
}}
 +
{{!}} {{#ifeq: {{Q|{{{?Name}}}|Resource 1}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 1 Amount}}|<!--
 
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 2}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 2 Amount}}|<!--
 
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 2}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 2 Amount}}|<!--
 
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 3}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 3 Amount}}|<!--
 
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 3}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 3 Amount}}|<!--
Line 9: Line 12:
 
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 5}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 5 Amount}}|<!--
 
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 5}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 5 Amount}}|<!--
 
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 6}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 6 Amount}}}} }} }} }} }} }}
 
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 6}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 6 Amount}}}} }} }} }} }} }}
<td> {{{?Type}}} {{#if:{{{?Type2}}}|- {{{?Type2}}} }}
+
{{!}} {{{?Type}}} {{#if:{{{?Type2}}}|- {{{?Type2}}} }}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
{{Documentation}}</noinclude>
 
{{Documentation}}</noinclude>

Revision as of 21:37, 24 April 2022

Documentation icon Template documentation[view] [edit] [history] [purge]

This template is only ever called as part of Template:Ingredient 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 {{Ingredient List|Steel}}

  • Product Ingredients Type [ExpandCollapse]
  • And {{Ingredient List|Patchleather}}

  • Product Ingredients Type [ExpandCollapse]