Difference between revisions of "Template:Number"
Jump to navigation
Jump to search
(Update templatedata) |
(update templatedata for icon display) |
||
Line 33: | Line 33: | ||
"example": "Z", | "example": "Z", | ||
"type": "string" | "type": "string" | ||
+ | }, | ||
+ | "icon": { | ||
+ | "label": "Icon", | ||
+ | "description": "Add an icon (e.g. for resource display)", | ||
+ | "example": "{{Resource|White}}", | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "iconpos": { | ||
+ | "label": "Icon Position", | ||
+ | "description": "Position of the icon (if specified), 'left' places it on the left, otherwise defaults to the right", | ||
+ | "example": "left", | ||
+ | "type": "string", | ||
+ | "default": "right" | ||
} | } | ||
}, | }, | ||
Line 60: | Line 73: | ||
|- | |- | ||
|<code><nowiki>{{Number|2e308}}</nowiki></code>||{{Number|2e308}} | |<code><nowiki>{{Number|2e308}}</nowiki></code>||{{Number|2e308}} | ||
+ | |- | ||
+ | |<code><nowiki>{{Number|2e28|icon={{Resource|Blue}}}}</nowiki></code>||{{Number|2e28|icon={{Resource|Blue}}}} | ||
|} | |} | ||
</noinclude> | </noinclude> |
Latest revision as of 02:31, 27 March 2021
Display a large number in named and/or scientific notations, matching in-game formatting
Parameter | Description | Type | Status | |
---|---|---|---|---|
Number | 1 | The number to display (in long form or scientific notation)
| Number | required |
Format | format | Force a specific format (named or scientific). If blank, displays both named and scientific (preferred)
| String | optional |
Prefix | prefix | Add an optional prefix to the number
| String | optional |
Suffix | suffix | Add an optional suffix to the number
| String | optional |
Sort Key | sortkey | Specify a custom sort key to override default table number sorting
| String | optional |
Icon | icon | Add an icon (e.g. for resource display)
| String | optional |
Icon Position | iconpos | Position of the icon (if specified), 'left' places it on the left, otherwise defaults to the right
| String | optional |