Writing it
dharmatiles version="1.0.0"
// library/parts/edges.dtile
defaults {
dirt top="[$groundHeight .. $groundHeight + 1dmm]" { pin top="$dirtEdgeHeight" at=edges }
water top="[$waterSurfaceHeight - 1.9dmm .. $waterSurfaceHeight + 3dmm]" { pin top="$waterEdgeHeight" at=edges }
}
Reference
| Line | Means |
|---|---|
dirt | The first dirt meets every tile edge at $dirtEdgeHeight, 3.4dmm; its top is [$groundHeight .. $groundHeight + 1dmm]. |
water | Water meets the tile edge at $waterEdgeHeight: $waterSurfaceHeight, 2.6dmm, plus 0.6dmm of a shared tide, cos(720deg * ($x - $y)), two waves a square, so two water tiles butt any way round. |
flagstones, planks | A built floor meets the edge at $floorEdgeHeight, flush with its top, 7.4dmm. |
The heights are the $ names of library/parts/heights.dtile; a tile may override them (and the edge note says it no longer butts a standard tile).
Notes
Runs on an edge (walls, cliffs) end in the standard end section, so runs butt together too. See how tiles meet.
Seen from the language
The guide pages that use edges: The tile document, Heights, Defaults and the edge contract.