Table of Contents

Class FloorIdGridSection

Namespace
LlamaLogic.Architecture
Assembly
LlamaLogic.Architecture.dll

Represents one of the seven floor id grids: the FloorKeysSection id painted on each quarter of each tile (🔓)

public sealed class FloorIdGridSection : LotArchitectureSection
Inheritance
FloorIdGridSection
Inherited Members

Remarks

The grid has SizeX × SizeZ tiles per layer and four ids per tile, one per FloorQuarter. Each id is a Id of the lot's FloorKeysSection, whose key is a CTProductFloorPattern (0xB4F762C9); 0 means no floor.

The types Floors, Ceilings, PoolSurfaces, SecondaryFloors and CeilingPaints have one layer per level of the lot (HasLevels), indexed by level − LowestLevel, so ground level is index −LowestLevel. TerrainFloors and PondBottoms have a single layer, for ground level. When the lot's Version is 8 or less, PoolSurfaces also has a single layer, for ground level.

Roles proven by the game's code and in-game tests: Floors is the floor pattern of each level, TerrainFloors the floor pattern painted on bare terrain, PondBottoms the pond bottom pattern and CeilingPaints the ceiling paint. In-game tests show that building a room fills Ceilings at the level above the room over exactly the room's tiles (and painting the ceiling changes only CeilingPaints), and that building a pool fills PoolSurfaces over exactly the pool's tiles at the level above the pool's block; the game's code assigns both grids to the room on the level below their layer. In-game tests show that building a room or a platform fills SecondaryFloors over its tiles with the lot's default floor key, and that painting a floor or a platform's top changes only Floors; the role of SecondaryFloors, which covers the same quarters as Floors, is still unknown.

The layers are stored one after another, each as SizeX rows of SizeZ tiles of four little-endian 16-bit ids; the section has no version.

Constructors

FloorIdGridSection(LotArchitectureSectionType, int, int, int)

Initializes a new instance of the FloorIdGridSection class with every id 0

public FloorIdGridSection(LotArchitectureSectionType type, int sizeX, int sizeZ, int levelCount)

Parameters

type LotArchitectureSectionType

The type of the section, which must be one of the floor id grid types

sizeX int

The number of tiles along the lot's local X axis

sizeZ int

The number of tiles along the lot's local Z axis

levelCount int

The number of layers: the lot's level count, or 1 for a grid with a single layer

Exceptions

ArgumentException

type is not a floor id grid type

ArgumentOutOfRangeException

sizeX, sizeZ or levelCount is not 0 through 255, or levelCount is not 1 for a type with no levels

Properties

HasLevels

Gets whether the grid has one layer per level of the lot, which all types but TerrainFloors and PondBottoms do

public bool HasLevels { get; }

Property Value

bool

Remarks

A PoolSurfaces grid of a lot whose Version is 8 or less has levels but only one layer, for ground level.

this[int, int, int, FloorQuarter]

Gets/sets the floor key id of a quarter of a tile

public ushort this[int x, int z, int levelIndex, FloorQuarter quarter] { get; set; }

Parameters

x int

The tile's index along the lot's local X axis

z int

The tile's index along the lot's local Z axis

levelIndex int

The layer: the level − LowestLevel, or 0 for a grid with a single layer

quarter FloorQuarter

The quarter of the tile

Property Value

ushort

Exceptions

ArgumentOutOfRangeException

A coordinate is outside the grid, or quarter is not a FloorQuarter

LevelCount

Gets the number of layers of the grid

public int LevelCount { get; }

Property Value

int

SizeX

Gets the number of tiles of the grid along the lot's local X axis

public int SizeX { get; }

Property Value

int

SizeZ

Gets the number of tiles of the grid along the lot's local Z axis

public int SizeZ { get; }

Property Value

int