Difference between revisions of "Template:Ingredient List Row"

From RimWorld Wiki
Jump to navigation Jump to search
(Undo revision 158446 by Harakoni (talk))
Tag: Undo
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><!--
|-
+
-->{{#vardefine:ignore | {{#ifeq: {{{?Product}}} | Patchleather | {{#switch: {{#var:ingredient}} | Patchleather | Human leather = true }} }} }}<!-- this prevents patchleather and human leather beeing listed as an ingredient for patchleather
! [[{{{?Name}}}]]{{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Ideology (DLC)|{{IdeologyIcon}}}} {{#ifeq: {{Q|{{{?Name}}}|From DLC}}|Royalty (DLC)|{{RoyaltyIcon}}}}
+
-->{{#if: {{#var:ignore}} ||
| <!--
+
<tr {{#var:mainCollapse}}>
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 1}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 1 Amount}}|<!--
+
! style="text-align:left;" data-sort-value="{{{?Product}}}" {{!}} {{#if:{{#vardefineecho:amount|{{Q|{{{?Product}}}|Product Amount}} }}|{{#var:amount}}×&nbsp;}}{{Icon Small|{{{?Product}}} }} {{DLC Icons|{{{?Product}}} }}
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 2}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 2 Amount}}|<!--
+
{{!}} {{Required Resources|{{{?Product}}}|sep=&nbsp;+|simple=1}}
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 3}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 3 Amount}}|<!--
+
{{!}} [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }}
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 4}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 4 Amount}}|<!--
+
</tr>
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 5}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 5 Amount}}|<!--
+
}}</includeonly><noinclude>
-->{{#ifeq: {{Q|{{{?Name}}}|Resource 6}} | {{#var:name}} | {{Q|{{{?Name}}}|Resource 6 Amount}}}} }} }} }} }} }}
 
| {{{?Type}}} {{#if:{{{?Type2}}}|- {{{?Type2}}} }}
 
</includeonly><noinclude>
 
 
{{Documentation}}</noinclude>
 
{{Documentation}}</noinclude>

Latest revision as of 14:49, 11 January 2025

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[edit]

This template isn't designed to be used in isolation, so as an example we'll show {{Ingredient List|Steel}}

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

  • Product Ingredients Type [Expand]