Difference between revisions of "Template:Ingredient List"

From RimWorld Wiki
Jump to navigation Jump to search
Line 6: Line 6:
 
! Name !! Amount !! Type
 
! Name !! Amount !! Type
 
|-
 
|-
{{#ask:[[Resource 1::{{lc:{{#var:name}}}}]]
+
{{#ask:[[Resource 1::{{lc:{{#var:name}}}}]] OR [[Resource 2::{{lc:{{#var:name}}}}]] OR [[Resource 3::{{lc:{{#var:name}}}}]] OR [[Resource 4::{{lc:{{#var:name}}}}]] OR [[Resource 5::{{lc:{{#var:name}}}}]] OR [[Resource 6::{{lc:{{#var:name}}}}]]
 
  | named args=yes
 
  | named args=yes
 
  | ?Name=?Name
 
  | ?Name=?Name
| ?Resource 1 Amount=?Amount
 
 
  | ?Type=?Type
 
  | ?Type=?Type
 
  | ?Type2=?Type2
 
  | ?Type2=?Type2
Line 15: Line 14:
 
  | template=Ingredient List Row
 
  | template=Ingredient List Row
 
  | limit = 500
 
  | limit = 500
 +
| sort = Type, Type2, Name
 
}}
 
}}
|-
 
{{#ask:[[Resource 2::{{lc:{{#var:name}}}}]]
 
| named args=yes
 
| ?Name=?Name
 
| ?Resource 2 Amount=?Amount
 
| ?Type=?Type
 
| ?Type2=?Type2
 
| format=template
 
| template=Ingredient List Row
 
| limit = 500
 
}}
 
|-
 
{{#ask:[[Resource 3::{{lc:{{#var:name}}}}]]
 
| named args=yes
 
| ?Name=?Name
 
| ?Resource 3 Amount=?Amount
 
| ?Type=?Type
 
| ?Type2=?Type2
 
| format=template
 
| template=Ingredient List Row
 
| limit = 500
 
}}
 
|-
 
{{#ask:[[Resource 4::{{lc:{{#var:name}}}}]]
 
| named args=yes
 
| ?Name=?Name
 
| ?Resource 4 Amount=?Amount
 
| ?Type=?Type
 
| ?Type2=?Type2
 
| format=template
 
| template=Ingredient List Row
 
| limit = 500
 
}}
 
|-
 
{{#ask:[[Resource 5::{{lc:{{#var:name}}}}]]
 
| named args=yes
 
| ?Name=?Name
 
| ?Resource 5 Amount=?Amount
 
| ?Type=?Type
 
| ?Type2=?Type2
 
| format=template
 
| template=Ingredient List Row
 
| limit = 500
 
}}
 
{{#ask:[[Resource 6::{{lc:{{#var:name}}}}]]
 
| named args=yes
 
| ?Name=?Name
 
| ?Resource 6 Amount=?Amount
 
| ?Type=?Type
 
| ?Type2=?Type2
 
| format=template
 
| template=Ingredient List Row
 
| limit = 500
 
}}
 
|-
 
 
|}
 
|}
 
</div>
 
</div>

Revision as of 15:10, 2 February 2021

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

Description

This template automatically creates a table of all items that use given material in their creation recipes, as well as how much of the material is required.

This template is dependent on Template: Ingredient List Row.

Parameters

The first parameter (if present) will specify which material to generate the template for. If absent, {{PAGENAME}} will be used.

noCollapse=1 will suppress the collapsible nature of table.

Example usage

{{Ingredient List}}

on the Steel page would produce:

  • {{Ingredient List| Neutroamine}}
    

    on any page would produce:

  • {{Ingredient List| Chemfuel|noCollapse=1}}
    

    on any page would produce: