Class TerrainPaintLayer
- Namespace
- LlamaLogic.Architecture
- Assembly
- LlamaLogic.Architecture.dll
Represents a layer of the TerrainPaintSection: a terrain paint and the mask of where it is applied
public sealed class TerrainPaintLayer
- Inheritance
-
TerrainPaintLayer
- Inherited Members
Remarks
Constructors
TerrainPaintLayer(int, int)
Initializes a new instance of the TerrainPaintLayer class with every mask value 0
public TerrainPaintLayer(int sizeX, int sizeZ)
Parameters
sizeXintThe number of mask values along the lot's local X axis, which must be the section's MaskSizeX
sizeZintThe number of mask values along the lot's local Z axis, which must be the section's MaskSizeZ
Exceptions
- ArgumentOutOfRangeException
sizeXorsizeZis not 0 through 1,021, the mask size of a lot of 255 tiles
Properties
HasMask
Gets/sets whether the layer has a mask, written from version 3
public bool HasMask { get; set; }
Property Value
Remarks
The game's writer writes true and the mask, or false and no mask, but its reader reads a mask either way, and so does this library. It is true in every lot examined.
this[int, int]
Gets/sets the mask value at a point
public byte this[int x, int z] { get; set; }
Parameters
Property Value
Exceptions
- ArgumentOutOfRangeException
A coordinate is outside the mask
Key
Gets/sets the key of the paint, a CTProductTerrainPaint (0xEBCBB16C)
public ResourceKey Key { get; set; }
Property Value
SizeX
Gets the number of mask values along the lot's local X axis
public int SizeX { get; }
Property Value
SizeZ
Gets the number of mask values along the lot's local Z axis
public int SizeZ { get; }
Property Value
UseCount
Gets/sets the number of uses of the layer
public uint UseCount { get; set; }
Property Value
Remarks
The game's writer drops the layers whose count is 0. It equals the number of nonzero mask values in every layer examined; this library does not recompute it.