atl/sm/terraintile
import "atl/sm/terraintile"Reading tile files (.tile) (sm.terrainTile). tile is a tile uuid from TileUuid(path); cellOffsetX/Y pick the cell in the tile.
Functions
Section titled "Functions"func TileUuid(path string) sm.UuidThe uuid of a tile file.
func Size(path string) intThe number of cells along one side of a tile.
func CreatorID(path string) stringThe id of the tile's creator.
func HeightAt(tile sm.Uuid, cellOffsetX, cellOffsetY, lod, x, y int) float64Terrain height at a vertex of a tile cell.
func ColorAt(tile sm.Uuid, cellOffsetX, cellOffsetY, lod, x, y int) sm.TerrainColorTerrain color at a vertex of a tile cell.
func MaterialAt(tile sm.Uuid, cellOffsetX, cellOffsetY, lod, x, y int) sm.MaterialWeightsThe 8 terrain material weights at a vertex of a tile cell.
func ClutterIdxAt(tile sm.Uuid, cellOffsetX, cellOffsetY, x, y int) intThe clutter index at a point of a tile cell.
func AssetsForCell(tile sm.Uuid, cellOffsetX, cellOffsetY, sizeLevel int) atl.Valuefunc HarvestablesForCell(tile sm.Uuid, cellOffsetX, cellOffsetY, sizeLevel int) atl.Valuefunc KinematicsForCell(tile sm.Uuid, cellOffsetX, cellOffsetY, sizeLevel int) atl.Valuefunc CreationsForCell(tile sm.Uuid, cellOffsetX, cellOffsetY int) atl.Valuefunc NodesForCell(tile sm.Uuid, cellOffsetX, cellOffsetY int) atl.Valuefunc DecalsForCell(tile sm.Uuid, cellOffsetX, cellOffsetY int) atl.Valuefunc PrefabsForCell(tile sm.Uuid, cellOffsetX, cellOffsetY int) atl.ValueA cell's contents, as the tables the matching TerrainScript Get...ForCell returns.
PrefabContent
Section titled "PrefabContent"type PrefabContent struct { Creations, Prefabs, Nodes, Assets, Decals, Harvestables, Kinematics atl.Value}Everything in a prefab file.
func ContentFromPrefab(path string, loadFlags *int) PrefabContentLoads a prefab file. loadFlags is the PrepareCell mask.