Template:Resource

From Cosmoteer Wiki
Jump to navigation Jump to search

link={{{resource}}}[[{{{resource}}}|{{{resource}}}]]

Template documentation
View or edit this documentation. (About template documentation)
CalloutIconNote.pngNote
Portions of the template sample may not be visible without values provided.

A far more simplified template for inserting resource icons into articles. No need to include the icon file name or target link page anymore, simply invoke the template and the required resource. For example

{{Resource|Steel}}

Results in: Steel Icon.pngSteel

These icons can even be used in-line, for example we can write about Steel Icon.pngSteel like this, or say that an experimental new part needs 10,000 Hyper-Coils Icon.pngHyper-Coils to construct.

List of Available Resources

The following is a list of current available icons:

Using Named Resource Parameter

{{Resource|resource=Tri-Steel}}

Result: Tri-Steel Icon.pngTri-Steel

Using "omit label" Parameter

By default, only a few resources have their labels omitted. If this option is present in any way (enabled/disabled), it overrides the default behaviour.

CalloutIconTip.pngTip
To see what resource labels are omitted by default check out the parameter description.

Examples:

  • {{Resource|resource=Tri-Steel|omit label=0}}Tri-Steel Icon.pngTri-Steel - no effect, label is present by default.
  • {{Resource|resource=Tri-Steel|omit label=1}}Tri-Steel Icon.png - label is omitted.
  • {{Resource|resource=Credits|omit label=0}}Credits Icon.pngCredits - label is displayed instead of being omitted by default.
  • {{Resource|resource=Credits|omit label=1}}Credits Icon.png - no effect, label is omitted by default.


A template for easily embedding resource icons wherever they are needed.

Template parameters

ParameterDescriptionTypeStatus
Resourceresource 1

The resource icon and the label to be shown. See the suggested values for all the valid options. Note that labels for Credits and Commands Points are hidden by default — see the "Omit label" option for more.

Suggested values
Credits Command Points Carbon Copper Gold Hyperium Iron Sulfur Tritanium Uranium Enriched Uranium Coils Hyper-Coils Diamond Processor Steel Tri-Steel Ammo EMP Missile Parts HE Missile Parts Nuclear Missile Parts Mine Parts Battery
Linerequired
Omit or display the labelomit label

Enable this to omit the label. Leave it disabled to display the label. Enabled by default for Credits and Command Points.

Auto value
0
Booleanoptional