Difference between revisions of "Template:Ingredient List Row"

From RimWorld Wiki
Jump to navigation Jump to search
(parameters for Required Resources template)
(Undo revision 158446 by Harakoni (talk))
Tag: Undo
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><!--
{{#ifexist:{{{?Product}}} |
+
-->{{#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
<tr class="mw-collapsible {{#if: {{#var:noCollapse}}||mw-collapsed}}" id="mw-customcollapsible-ingredient-list-{{#replace:{{#var:ingredient}}|<nowiki> </nowiki>}}">
+
-->{{#if: {{#var:ignore}} ||
! {{DLC Icons|{{{?Product}}} }}
+
<tr {{#var:mainCollapse}}>
 +
! style="text-align:left;" data-sort-value="{{{?Product}}}" {{!}} {{#if:{{#vardefineecho:amount|{{Q|{{{?Product}}}|Product Amount}} }}|{{#var:amount}}×&nbsp;}}{{Icon Small|{{{?Product}}} }} {{DLC Icons|{{{?Product}}} }}
 
{{!}} {{Required Resources|{{{?Product}}}|sep=&nbsp;+|simple=1}}
 
{{!}} {{Required Resources|{{{?Product}}}|sep=&nbsp;+|simple=1}}
 
{{!}} [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }}
 
{{!}} [[{{{?Type}}}]] {{#if:{{{?Type2}}}|- [[{{{?Type2}}}]] }}

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]