Table of Contents

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

The mask is stored as SizeX rows of SizeZ bytes.

Constructors

TerrainPaintLayer(int, int)

Initializes a new instance of the TerrainPaintLayer class with every mask value 0

public TerrainPaintLayer(int sizeX, int sizeZ)

Parameters

sizeX int

The number of mask values along the lot's local X axis, which must be the section's MaskSizeX

sizeZ int

The number of mask values along the lot's local Z axis, which must be the section's MaskSizeZ

Exceptions

ArgumentOutOfRangeException

sizeX or sizeZ is 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

bool

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

x int

The index along the lot's local X axis

z int

The index along the lot's local Z axis

Property Value

byte

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

ResourceKey

SizeX

Gets the number of mask values along the lot's local X axis

public int SizeX { get; }

Property Value

int

SizeZ

Gets the number of mask values along the lot's local Z axis

public int SizeZ { get; }

Property Value

int

UseCount

Gets/sets the number of uses of the layer

public uint UseCount { get; set; }

Property Value

uint

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.