Difference between revisions of "Template:Required Resources"
Jump to navigation
Jump to search
(plurals) |
(Section is long and adding messy breaks on small screens. Test 1) |
||
Line 3: | Line 3: | ||
| {{Icon Small|{{#var:r1}} }} {{#if:{{{simple|}}}|{{#var:r1a}}|{{Plural|{{#var:r1a}}|{{#var:r1}}|link=1}} }} | | {{Icon Small|{{#var:r1}} }} {{#if:{{{simple|}}}|{{#var:r1a}}|{{Plural|{{#var:r1a}}|{{#var:r1}}|link=1}} }} | ||
}} }}<!-- | }} }}<!-- | ||
− | -->{{#ifeq:{{lc:{{#var:r1}}}}|stuff| | + | -->{{#ifeq:{{lc:{{#var:r1}}}}|stuff|<nowiki> </nowiki>([[{{#explode:{{#vardefineecho:stuffTags|{{Q|{{#var:name}}|Stuff Tags}}}}|,}}]]{{#if:{{#explode:{{#var:stuffTags}}|,|1}}|/[[{{#explode:{{#var:stuffTags}}|,|1}}]]}}{{#if:{{#explode:{{#var:stuffTags}}|,|2}}|/[[{{#explode:{{#var:stuffTags}}|,|2}}]]}}{{#if:{{#explode:{{#var:stuffTags}}|,|3}}|/[[{{#explode:{{#var:stuffTags}}|,|3}}]]}}{{#if:{{#explode:{{#var:stuffTags}}|,|4}}|/[[{{#explode:{{#var:stuffTags}}|,|4}}]]}})}}<!-- |
-->{{#if:{{#vardefineecho:r2|{{Q|{{#var:name}}|Resource 2}} }}|{{{sep|,}}}{{#vardefine:r2a|{{#expr:{{Q|{{#var:name}}|Resource 2 Amount}}*{{{2|1}}}}} }} {{#ifeq:{{lc:{{#var:r2}} }} | nutrition | -->{{#if:{{#vardefineecho:r2|{{Q|{{#var:name}}|Resource 2}} }}|{{{sep|,}}}{{#vardefine:r2a|{{#expr:{{Q|{{#var:name}}|Resource 2 Amount}}*{{{2|1}}}}} }} {{#ifeq:{{lc:{{#var:r2}} }} | nutrition | ||
| {{#var:r2a}} [[Nutrition]] ({{Q|{{#var:name}}|Resource 2 Type}}) | | {{#var:r2a}} [[Nutrition]] ({{Q|{{#var:name}}|Resource 2 Type}}) |
Revision as of 06:21, 21 October 2023
Returns a list of the resources required to make an item.
Parameters
First parameter is the item whose required resources are to be returned (optional, default = PAGENAME).
Second parameter is a multiplier (optional, default = 1).
sep
is the seperator parameter (optional, default = ",").
simple
removes the name of the time and only leaves the icon (set to any text or value, usually "1").
Examples
{{Required Resources|Plate armor}}
{{Required Resources|Plate armor|3}}
{{Required Resources|Phoenix armor}}
150 Plasteel, 50 Uranium, 6 Advanced components, 75 Steel, 4 Components, 40 Chemfuel
{{Required Resources|Phoenix armor|sep= +}}
150 Plasteel + 50 Uranium + 6 Advanced components + 75 Steel + 4 Components + 40 Chemfuel
{{Required Resources|Phoenix armor|sep= +|simple=1}}
{{Required Resources|Phoenix armor|sep= +|simple=1|2}}
The above documentation is transcluded from Template:Required Resources/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. |