Template:Cost: Difference between revisions

From Inkipedia, the Splatoon wiki
m (fixing not linking to fish scales (i hate unnamed parameters for this reason))
m (moved documentation)
Line 1: Line 1:
<includeonly>[[File:{{{1}}} Icon {{#switch:{{{3|{{{currency|cash}}}}}}
[[File:{{{1}}} Icon {{#switch:{{{3|{{{currency|cash}}}}}}
|pe=Power Egg{{#ifeq:{{{1}}}|S3|&#32;Alterna}}
|pe=Power Egg{{#ifeq:{{{1}}}|S3|&#32;Alterna}}
|sss=Super Sea Snail
|sss=Super Sea Snail
Line 50: Line 50:
|ss
|ss
|gs=Fish scale
|gs=Fish scale
|#default=Cash}}|{{{2}}}]]|{{{2}}}}}}}</span></includeonly><noinclude>__NOTOC__
|#default=Cash}}|{{{2}}}]]|{{{2}}}}}}}</span><noinclude>
Displays an inline currency icon with a text link.


=== Usage ===
{{documentation}}
{{t|Cost|game|price|currency|size|link|textwidth}}
 
{| class="wikitable sitecolor-generic"
| style="vertical-align:top" |<code>game</code>
| style="vertical-align:top" |Unnamed, required
| colspan="4" |The game that the cost belongs to. Must be one of the following:
* <code>S</code> for ''Splatoon''
* <code>S2</code> for ''Splatoon 2''
* <code>S3</code> for ''Splatoon 3''
|-
| style="vertical-align:top" |<code>price</code>
| style="vertical-align:top" |Unnamed, required
| colspan="4" |The number / string to show as the cost.<br />If set empty, the template will show the icon but no number.<br />Use <code>0</code> or <code>Free</code> for free items.
|-
| rowspan="14" style="vertical-align:top" |<code>currency</code>
| rowspan="14" style="vertical-align:top" |Unnamed, optional
| colspan="4" |The currency to use.<br />The default value is <code>cash</code>.
|-
|Must be one of the following:
|width="24px" | S
|width="24px" | S2
|width="24px" | S3
|-
|<code>cash</code> || {{Cost|S| |cash}} || {{Cost|S2| |cash}} || {{Cost|S3| |cash}}
|-
|<code>pe</code> || {{Cost|S| |pe}} || {{Cost|S2| |pe}} || {{Cost|S3| |pe}}
|-
|<code>sss</code> || {{Cost|S| |sss}} || {{Cost|S2| |sss}} || {{Cost|S3| |sss}}
|-
|<code>ge</code> ||  || {{Cost|S2| |ge}} || {{Cost|S3| |ge}}
|-
|<code>sard</code> ||  || {{Cost|S2| |sard}} || {{Cost|S3| |sard}}
|-
|<code>ac</code> ||  || {{Cost|S2| |ac}} ||
|-
|<code>cqp</code> ||  || {{Cost|S2| |cqp}} ||
|-
|<code>sl</code> ||  ||  || {{Cost|S3| |sl}}
|-
|<code>gsl</code> ||  ||  || {{Cost|S3| |gsl}}
|-
|<code>bs</code> ||  ||  || {{Cost|S3| |bs}}
|-
|<code>ss</code> ||  ||  || {{Cost|S3| |ss}}
|-
|<code>gs</code> ||  ||  || {{Cost|S3| |gs}}
|-
| style="vertical-align:top" |<code>size</code>
| style="vertical-align:top" |Unnamed, optional
| colspan="4" |The icon size for the currency icon. The default is <code>24</code>.
|-
| style="vertical-align:top" |<code>link</code>
| style="vertical-align:top" |Unnamed, optional
| colspan="4" |If present, the amount text will be a link to the currency's page.
|-
| style="vertical-align:top" |<code>textwidth</code>
| style="vertical-align:top" |Unnamed, optional
| colspan="4" |Requries <code>size</code> and <code>link</code> to both be present.<br />If specified, the label will be set inside a right-aligned rectangle of the specified width
|}
 
=== Markup ===
<pre>
*{{Cost|S|200}}
*{{Cost|S2|200}}
*{{Cost|S3|200}}
*{{Cost|S|}}
*{{Cost|S|1|sss}}
*{{Cost|S2| |ac}}
*{{Cost|S3|160|bs}}
*{{Cost|S|200|cash|48}}
*{{Cost|S|200|cash|link}}
*{{Cost|S|200|cash|48|link}}
*{{Cost|S|200|cash|24|link|60}}
*{{Cost|S|200|cash|24| |60}}
</pre>
 
=== Output ===
*{{Cost|S|200}}
*{{Cost|S2|200}}
*{{Cost|S3|200}}
*{{Cost|S|}}
*{{Cost|S|1|sss}}
*{{Cost|S2| |ac}}
*{{Cost|S3|160|bs}}
*{{Cost|S|200|cash|48}}
*{{Cost|S|200|cash|link}}
*{{Cost|S|200|cash|48|link}}
*{{Cost|S|200|cash|24|link|60}}
*{{Cost|S|200|cash|24| |60}}
 
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 21:36, 22 December 2023

[[File:{{{1}}} Icon Cash.png|24px|Cash|link=Cash]]



Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:Cost/doc to edit this documentation. (How does this work?)

Displays an inline currency icon with a text link.

Usage

{{Cost|<game>|<price>|<currency>|<size>|<link>|<textwidth>}}

game Unnamed, required The game that the cost belongs to. Must be one of the following:
  • S for Splatoon
  • S2 for Splatoon 2
  • S3 for Splatoon 3
price Unnamed, required (may be empty) The quantity to show as the cost.
If set empty, the template will show the icon only.
Note that this template also accepts space (' ') which handles differently to empty.
Use 0 or Free for free items.
currency Unnamed, optional The currency to use.
The default value is cash.
Must be one of the following: S S2 S3
cash Cash Cash Cash
pe Power Eggs Power Eggs Power Eggs
sss Super Sea Snails Super Sea Snails Super Sea Snails
ge Golden Eggs
sard Sardinium
ac Ability Chunks
cqp CQ Points
sl Sheldon Licenses
gsl Gold Sheldon Licenses
bs Bronze Fish Scales
ss Silver Fish Scales
gs Gold Fish Scales
mb Cash
pl Cash
size Unnamed, optional The icon size for the currency icon. The default is 24.
link Unnamed, optional If present, the amount text will be a link to the currency's page.
textwidth Unnamed, optional Requries size and link to both be present.
If specified, the label will be set inside a right-aligned rectangle of the specified width

Markup

*{{Cost|S|200}}
*{{Cost|S2|200}}
*{{Cost|S3|200}}
*{{Cost|S|}}
*{{Cost|S|1|sss}}
*{{Cost|S2||ac}}
*{{Cost|S3|160|bs}}
*{{Cost|S|200|cash|48}}
*{{Cost|S|200|cash|link}}
*{{Cost|S|200|cash|48|link}}
*{{Cost|S|200|cash|24|link|60}}
*{{Cost|S|200|cash|24| |60}}

Output

  • Cash 200
  • Cash 200
  • Cash 200
  • Cash
  • Super Sea Snail 1
  • Ability Chunks
  • Bronze Fish Scales 160
  • Cash 200
  • Cash 200
  • Cash 200
  • Cash 200
  • Cash 200