Template:Tile: Difference between revisions

From DDraceNetwork
fix link
m Reverted edits by Zwelf (talk) to last revision by Ryozuki
Tag: Rollback
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
Usage: <code><nowiki>{{Tile|layer|index}}</nowiki></code>. No image is displayed if the layer name is misspelled or no tile exists at that index on the layer. Use [https://ddnet.tw/explain ddnet.tw/explain] to determine indices of tiles.
Usage: <code><nowiki>{{Tile|layer|index}}</nowiki></code>. No image is displayed if the layer name is misspelled or no tile exists at that index on the layer. Use [https://ddnet.org/explain ddnet.org/explain] to determine indices of tiles. This can be used in combination with [[Template:TileLink]]


== Examples ==
== Examples ==
Line 9: Line 9:
! Layer !! code !! preview
! Layer !! code !! preview
|-
|-
| entities || <code><nowiki>{{Tile|entities|1}}</nowiki></code> || {{Tile|entities|1}}
| [https://ddnet.org/explain/ entities] || <code><nowiki>{{Tile|entities|1}}</nowiki></code> || {{Tile|entities|1}}
|-
|-
| game || <code><nowiki>{{Tile|game|3}}</nowiki></code> || {{Tile|game|3}}
| [https://ddnet.org/explain/game/ game] || <code><nowiki>{{Tile|game|3}}</nowiki></code> || {{Tile|game|3}}
|-
|-
| front || <code><nowiki>{{Tile|front|66}}</nowiki></code> || {{Tile|front|66}}
| [https://ddnet.org/explain/front front] || <code><nowiki>{{Tile|front|66}}</nowiki></code> || {{Tile|front|66}}
|-
|-
| tele || <code><nowiki>{{Tile|tele|26}}</nowiki></code> || {{Tile|tele|26}}
| [https://ddnet.org/explain/tele tele] || <code><nowiki>{{Tile|tele|26}}</nowiki></code> || {{Tile|tele|26}}
|-
|-
| speedup || <code><nowiki>{{Tile|speedup|28}}</nowiki></code> || {{Tile|speedup|28}}
| [https://ddnet.org/explain/speedup speedup] || <code><nowiki>{{Tile|speedup|28}}</nowiki></code> || {{Tile|speedup|28}}
|-
|-
| switch || <code><nowiki>{{Tile|switch|22}}</nowiki></code> || {{Tile|switch|22}}
| [https://ddnet.org/explain/switch switch] || <code><nowiki>{{Tile|switch|22}}</nowiki></code> || {{Tile|switch|22}}
|-
|-
| tune || <code><nowiki>{{Tile|tune|68}}</nowiki></code> || {{Tile|tune|68}}
| [https://ddnet.org/explain/tune tune] || <code><nowiki>{{Tile|tune|68}}</nowiki></code> || {{Tile|tune|68}}
|}
|}
[[Category:Templates]]
</noinclude><includeonly><span class="display-tile {{{1}}}" style="background-position: -{{#expr: ( {{{2}}} mod 16) * 32}}px -{{#expr: (floor({{{2}}} div 16)) * 32}}px;"></span></includeonly><noinclude><templatedata>
{
"params": {
"1": {
"aliases": [
"layer"
],
"label": "Layer",
"description": "The layer where the tile is located.",
"example": "game",
"type": "string",
"suggestedvalues": [
"game",
"front",
"tele",
"speedup",
"entities",
"switch",
"tune"
],
"required": true
},
"2": {
"aliases": [
"index"
],
"label": "Index",
"description": "The index of the tile.",
"example": "1",
"type": "number",
"required": true
}
},
"description": "A tile link with a icon.",
"format": "inline"
}
</templatedata>
</noinclude>
</noinclude>
<includeonly><span class="display-tile {{{1}}}" style="background-position: -{{#expr: ( {{{2}}} mod 16) * 32}}px -{{#expr: (floor({{{2}}} div 16)) * 32}}px;"></span></includeonly>

Latest revision as of 22:12, 3 August 2023

Usage: {{Tile|layer|index}}. No image is displayed if the layer name is misspelled or no tile exists at that index on the layer. Use ddnet.org/explain to determine indices of tiles. This can be used in combination with Template:TileLink

Examples

Caption text
Layer code preview
entities {{Tile|entities|1}}
game {{Tile|game|3}}
front {{Tile|front|66}}
tele {{Tile|tele|26}}
speedup {{Tile|speedup|28}}
switch {{Tile|switch|22}}
tune {{Tile|tune|68}}

A tile link with a icon.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Layer1 layer

The layer where the tile is located.

Suggested values
game front tele speedup entities switch tune
Example
game
Stringrequired
Index2 index

The index of the tile.

Example
1
Numberrequired