Template

LinesOverlay

From Dogcraft Wiki

Revision as of 11:58, 21 March 2024 by Xpmodder (talk | contribs)



{{LinesOverlay|
info 0,-500
station 258,-147
shelter 313,-154
port 271,-66
portal 272,-235
line #ff4500 237,-91 306,-91 324,-95 413,-95 434,-92 478,-72 514,-72 521,-60
line #ff4500 302,-91 305,-82 305,-66 308,-51 308,-25 327,8
line #ff4500 275,-92 274,-121 283,-134 284,-156 282,-168 269,-216 269,-231 274,-250 289,-262 297,-278 399,-379 399,-393 397,-396 385,-396 382,-399 382,-454 396,-468 396,-489 394,-491 387,-491 369,-509
line lime 269,-135 276,-132 328,-126 360,-100 422,-100 436,-97 468,-82 484,-83 489,-85 543,-85
line yellow 248,-139 244,-136 245,-130 253,-126 279,-126 304,-119 312,-111 315,-99 315,-56 318,-47 323,-43 328,-41 353,-41 361,-38 363,-34 365,-29 365,-13 367,-7 373,-2 383,0 389,6
}}

This template creates lines and icons based on lists of coordinates.
There are 5 types of icons available:
- station: an icon of a train for SRN rail stations
- port: an icon of an anchor for CSC ports
- shelter: an icon of a horse for RHN shelters
- portal: an icon of a doorway/archway for nether portals or NTN builds
- icon: an arbitrary fontawesome icon
All these are created by a line starting with the icon type followed by a space and then a set of coordinates noted as x,z (eg: 500,-200)
For type icon after the coordinates (separated with a single space) put the fa classes. (multiple classes are separated by single spaces)

Lines are created from any line starting with "line" followed by a css color value (separated by a single space), an optional width value (separated from the color with a single colon ':') and a list of coordinates noted as x,z and separated by single spaces (eg: 200,500 200,120 180,100). Lines are drawn from the coordinates in segments, from one point to the next.

A custom coordinate offset and maximum size of the output can be specified in a line starting with "info". This accepts 2 sets of 'coordinates' separated by a single space.
The first set of coordinates provides an offset by setting the top-left corner of the output to the given coordinates.
The second set of coordinates provides the maximum width and height and with that also the aspect ratio of the output.
Eg: "info 500,-1000 1000,500" will set the top-left corner to be at coordinates x:500, z:-1000 and will set the max width to 1000, the max height to 500 and the aspect-ratio to 1000/500 = 2/1.

This page was last modified on 21 March 2024, at 11:58. (59 days ago)