틀:Mph/doc
This template is used to display a speed/velocity value in miles per hour, optionally including the equivalent in tiles per second.
Usage
{{ mph | <numerical mph/tiles-per-sec value> | tiles/tiles_text/text_tiles/full (optional) | mode = tiles/tiles_text/text_tiles/full (optional) }}
- First unnamed parameter
The numerical value of the speed/velocity in mph or tiles per second. The string
or tile
needs to be appended for values in tiles per second (e.g. tiles
). Supports decimals and negative numbers.
31 tiles
- Second unnamed parameter or mode
Control the output format:
Mode | Description |
---|---|
(default) | The numerical speed/velocity appended with mph, as displayed in-game |
|
Raw numerical tiles-per-second value |
|
The tiles-per-second value with unit |
|
The default output appended with the output
|
All mph values can be hovered over to reveal a brief explanation.
Examples
Code | Result |
---|---|
No input | |
{{mph}} |
틀:Mph |
Mph input | |
{{mph|31}} |
틀:Mph |
{{mph|3.1415}} |
틀:Mph |
{{mph|-31415}} |
틀:Mph |
{{mph|31|tiles}} |
틀:Mph |
{{mph|31|tiles_text}} |
틀:Mph |
{{mph|31|full}} |
틀:Mph |
{{mph|{{#[[[:틀:Tl/parser function links]]##expr expr]:15/11 round 4}}|full}} |
틀:Mph |
Tiles/sec input | |
{{mph|31tile}} |
틀:Mph |
{{mph|3.1415tiles}} |
틀:Mph |
{{mph|-31415 tile}} |
틀:Mph |
{{mph|31 tiles|mode=tiles}} |
틀:Mph |
{{mph|31 TILES|mode=tiles_text}} |
틀:Mph |
{{mph|31TILE|mode=full}} |
틀:Mph |
{{mph|{{#[[[:틀:Tl/parser function links]]##expr expr]:11/15 round 4}}tiles|mode=full}} |
틀:Mph |
Notes
- Note the rounding that is issued when displaying mph values:
{{mph|42|full}}
→ 틀:Mph{{mph|31 tiles|mode=full}}
→ 틀:Mph
- The exact mph equivalent of 31 tiles per second would be 42.272727272727 mph, but this value is rounded just like it is in-game.
Options
This template supports options through {{options}} template. All valid options are listed below, see {{options}} for usage and other infomation.
See Template:mph/initOptions for the initial options setting of this template.
Name | Alias | Initial Value | Value Mapping[1] | Note |
---|---|---|---|---|
mode | (empty) | text_tiles → tiles_text text tiles → tiles_text text+tiles → tiles_text tiles+text → tiles_text tiles text → tiles_text text_tile → tiles_text text tile → tiles_text text+tile → tiles_text tile_text → tiles_text tile+text → tiles_text tile text → tiles_text |
- ↑ Values with mapping will be stored and loaded as mapped value. Other values without mapping will be stored and loaded as-is.
Example:
{{mph|10}} {{options|mph|mode=tiles_text}} {{mph|10}} {{options|mph|mode=tiles}} {{mph|10}} {{options|mph|reset}} {{mph|10}}
Will output:
틀:Mph
틀:Mph
틀:Mph
틀:Mph
- Pages using DynamicPageList3 dplvar parser function
- 구식 enclose 속성을 사용하는 문서
- Pages using DynamicPageList3 dplreplace parser function
- Pages using DynamicPageList3 parser function
- Template documentation