|
|
(24 intermediate revisions by 10 users not shown) |
Line 1: |
Line 1: |
| <includeonly>[[File:{{#iferror:{{#expr:{{{1}}}}}|{{{1}}}|{{#switch:{{{game}}} | | <includeonly>{{#invoke:Cost|main}}</includeonly><noinclude> |
| |Splatoon 2=S2
| | Template invocation of [[Module:Cost]]. |
| |Splatoon
| |
| |#default=S}}}} Icon {{#switch:{{{3|{{{currency|cash}}}}}}
| |
| |pe=Power Egg
| |
| |sss=Super Sea Snail
| |
| |ge=Golden Egg
| |
| |sard
| |
| |sardinium=Sardinium Shadow
| |
| |ac=Ability Chunk Generic
| |
| |cash
| |
| |#default=Cash}}.png|{{#iferror:{{#expr:{{{1}}}}}|{{#iferror:{{#expr:{{{4|24}}}}}|24}}px|{{{2|24px}}}}}|{{#switch:{{{3|{{{currency|cash}}}}}}
| |
| |pe=Power Egg{{#ifeq:{{{2}}}|1||s}}
| |
| |sss=Super Sea Snail{{#ifeq:{{{2}}}|1||s}}
| |
| |ge=Golden Egg{{#ifeq:{{{2}}}|1||s}}
| |
| |sard
| |
| |sardinium=Sardinium
| |
| |ac=Ability Chunk{{#ifeq:{{{2}}}|1||s}}
| |
| |cash
| |
| |#default=Cash}}|link={{#switch:{{{3|{{{currency|cash}}}}}}
| |
| |pe=Power Egg
| |
| |sss=Super Sea Snail
| |
| |ge=Golden Egg
| |
| |sard
| |
| |sardinium=Sardinium
| |
| |ac=Ability Chunk
| |
| |cash
| |
| |#default=Cash}}]]{{#ifeq:{{#if:{{#ifeq:{{{icononly}}}|true|1}}{{#iferror:{{#expr:{{{1}}}}}|{{#if:{{{2|}}}||2}}|}}|nolink}}{{{5|{{{4|{{#ifeq:{{{link}}}|true|link}}}}}}}}|link|[[{{#switch:{{{3|{{{currency|cash}}}}}}
| |
| |pe=Power Egg
| |
| |sss=Super Sea Snail
| |
| |ge=Golden Egg
| |
| |sard
| |
| |sardinium=Sardinium
| |
| |ac=Ability Chunk
| |
| |cash
| |
| |#default=Cash}}|{{#iferror:{{#expr:{{{1}}}}}|{{#if:{{{2|}}}| {{{2}}}}}|{{#ifeq:{{{icononly}}}|true|| {{{1|}}}}}}}]]|{{#iferror:{{#expr:{{{1}}}}}|{{#if:{{{2|}}}| {{{2}}}}}|{{#ifeq:{{{icononly}}}|true|| {{{1|}}}}}}}}}<!--Helper categories, only for locating issues-->{{#if:{{{currency|}}}{{{icononly|}}}{{{game|}}}{{{link|}}}{{#iferror:{{#expr:{{{1}}}}}||!}}|[[Category:Pages_that_use_the_old_format_of_the_Cost_Template]]}}</includeonly><noinclude>__NOTOC__
| |
| Displays an inline currency icon with a text link.
| |
| | |
| {{!!}} '''This template is undergoing a hand-over-hand change. Please do not use the legacy parameter set!'''
| |
| | |
| === Usage ===
| |
| {{t|Cost|game|price|currency|size|link}}
| |
| | |
| {| class="wikitable sitecolor-generic"
| |
| | style="vertical-align:top" |<code>game</code>
| |
| | style="vertical-align:top" |Unnamed, required
| |
| | colspan="3" |The game that the cost belongs to. Must be one of the following:
| |
| * <code>S</code> for ''Splatoon''
| |
| * <code>S2</code> for ''Splatoon 2''
| |
| |-
| |
| | style="vertical-align:top" |<code>price</code>
| |
| | style="vertical-align:top" |Unnamed, required
| |
| | colspan="3" |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="8" style="vertical-align:top" |<code>currency</code>
| |
| | rowspan="8" style="vertical-align:top" |Unnamed, optional
| |
| | colspan="3" |The currency to use.<br />The default value is <code>cash</code>.
| |
| |-
| |
| |Must be one of the following:
| |
| |width="24px" | S
| |
| |width="24px" | S2
| |
| |-
| |
| |<code>cash</code> || {{Cost|S| |cash}} || {{Cost|S2| |cash}}
| |
| |-
| |
| |<code>pe</code> || {{Cost|S| |pe}} || {{Cost|S2| |pe}}
| |
| |-
| |
| |<code>sss</code> || {{Cost|S| |sss}} || {{Cost|S2| |sss}}
| |
| |-
| |
| |<code>ge</code> || || {{Cost|S2| |ge}}
| |
| |-
| |
| |<code>sard</code> || || {{Cost|S2| |sard}}
| |
| |-
| |
| |<code>ac</code> || || {{Cost|S2| |ac}}
| |
| |-
| |
| | style="vertical-align:top" |<code>size</code>
| |
| | style="vertical-align:top" |Unnamed, optional
| |
| | colspan="3" |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="3" |If present, the amount text will be a link to the currency's page.
| |
| |}
| |
| | |
| === Markup ===
| |
| <pre>
| |
| *{{Cost|S|200}}
| |
| *{{Cost|S2|200}}
| |
| *{{Cost|S|}}
| |
| *{{Cost|S|1|sss}}
| |
| *{{Cost|S2| |ac}}
| |
| *{{Cost|S|200|cash|48}}
| |
| *{{Cost|S|200|cash|link}}
| |
| *{{Cost|S|200|cash|48|link}}
| |
| </pre>
| |
| | |
| === Output ===
| |
| *{{Cost|S|200}}
| |
| *{{Cost|S2|200}}
| |
| *{{Cost|S|}}
| |
| *{{Cost|S|1|sss}}
| |
| *{{Cost|S2| |ac}}
| |
| *{{Cost|S|200|cash|48}}
| |
| *{{Cost|S|200|cash|link}}
| |
| *{{Cost|S|200|cash|48|link}}
| |
| | |
| === Legacy Parameters ===
| |
| {|
| |
| |- style="vertical-align: top;"
| |
| |<code>price</code>||Unnamed.||The numeric price to display.
| |
| |- style="vertical-align: top;"
| |
| |<code>size</code>||Unnamed, optional.||A MediaWiki image size value to use for the icon. The default size is 24px.
| |
| |- style="vertical-align: top;"
| |
| |<code>currency</code>||Optional.||The type of currency to display. The default value is "cash". Must be one of the following:
| |
| * [[File:S_Icon_Cash.png|20px|link=]] [[File:S2_Icon_Cash.png|20px|link=]] cash
| |
| * [[File:S_Icon_Power Egg.png|20px|link=]] [[File:S2_Icon_Power Egg.png|20px|link=]] pe
| |
| * [[File:S_Icon_Super Sea Snail.png|20px|link=]] [[File:S2_Icon_Super Sea Snail.png|20px|link=]] sss
| |
| * [[File:S2_Icon_Golden Egg.png|20px|link=]] ge
| |
| * [[File:S2_Icon_Sardinium_Shadow.png|20px|link=]] sardinium
| |
| * [[File:S2_Icon_Ability_Chunk_Generic.png|20px|link=]] ac
| |
| |- style="vertical-align: top;"
| |
| |<code>game</code>||Optional.||The game the cost applies to. The default value is "Splatoon". Must be one of the following:
| |
| *Splatoon
| |
| *Splatoon 2
| |
| |- style="vertical-align: top;"
| |
| |<code>link</code>||Optional.||If present and set to <code>true</code>, the text label will be a link.
| |
| |- style="vertical-align: top;"
| |
| |<code>icononly</code>||Optional.||If present and set to <code>true</code>, the text label will be omitted.
| |
| |- style="vertical-align: top;"
| |
| |<code>width</code>||Optional.||A CSS width value to use for the text label. The text itself will be right-aligned.
| |
| |}
| |
| | |
| === Legacy Examples ===
| |
| | |
| ==== Markup ====
| |
| <nowiki>{{Cost|200}}<br />
| |
| {{Cost|200|48px}}<br />
| |
| {{Cost|200|currency=pe}}<br />
| |
| {{Cost|200|currency=sss|link=true}}<br />
| |
| {{Cost|200|icononly=true}}<br />
| |
| {{Cost|200|width=50px}}<br />
| |
| {{Cost|200|game=Splatoon 2}}</nowiki>
| |
| | |
| ==== Output ====
| |
| {{Cost|200}}<br />
| |
| {{Cost|200|48px}}<br />
| |
| {{Cost|200|currency=pe}}<br />
| |
| {{Cost|200|currency=sss|link=true}}<br />
| |
| {{Cost|200|icononly=true}}<br />
| |
| {{Cost|200|width=50px}}<br />
| |
| {{Cost|200|game=Splatoon 2}}
| |
|
| |
|
| | {{:Module:Cost/doc}} |
| </noinclude> | | </noinclude> |