Difference between revisions of "Template:Rarity"
Dinoguy1000 (talk | contribs) m (Protected "Template:R": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
(+ 10000 Secret Rare) |
||
Line 19: | Line 19: | ||
| escr | extra secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Extra Secret Rare | EScR }} | | escr | extra secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Extra Secret Rare | EScR }} | ||
| 20scr | 20th secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | 20th Secret Rare | 20ScR }} | | 20scr | 20th secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | 20th Secret Rare | 20ScR }} | ||
+ | | 10000scr | 10000 secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | 10000 Secret Rare | 10000ScR }} | ||
| plr | platinum = {{ {{{|safesubst:}}}#if: {{{full|}}} | Platinum Rare | PlR }} | | plr | platinum = {{ {{{|safesubst:}}}#if: {{{full|}}} | Platinum Rare | PlR }} | ||
| plscr | platinum secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Platinum Secret Rare | PlScR }} | | plscr | platinum secret = {{ {{{|safesubst:}}}#if: {{{full|}}} | Platinum Secret Rare | PlScR }} |
Revision as of 11:20, 28 July 2019
Usage
This template is used to standardize rarity names/abbreviations for templates, so they don't have to implement such a check locally. It currently supports all official rarities and their abbreviations, and is not case-sensitive. The template doesn't return anything when fed unsupported values, which can be used for error-checking.
Basic usage is {{rarity|rarity}}
, outputting the abbreviation for the given rarity. The full name can be output instead by using the {{{full}}}
parameter.
Examples
Code | Result | Code | Result |
---|---|---|---|
{{rarity|Common}} |
C | {{rarity|C}} |
C |
{{rarity|common}} |
C | {{rarity|c}} |
C |
{{rarity|Common|full=yes}} |
Common | {{rarity|C|full=yes}} |
Common |
{{rarity|Rare}} |
R | {{rarity|R}} |
R |
{{rarity|Ghost Rare}} |
GR | {{rarity|GR}} |
GR |
{{rarity|Foo}} |
{{rarity|BLA}} |
||
{{rarity|}} |
{{rarity}} |