Template:Tile: Difference between revisions
Add template category |
Link to explain directly for each layer |
||
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. | 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]] | [[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><includeonly><span class="display-tile {{{1}}}" style="background-position: -{{#expr: ( {{{2}}} mod 16) * 32}}px -{{#expr: (floor({{{2}}} div 16)) * 32}}px;"></span></includeonly> |
Revision as of 22:15, 30 August 2022
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
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}} |