MapChunkLayer
A class in Root.Township, Alta.Caves.
A 3D grid of float values for one cave generator plugin over one map chunk, with an overflow border around the chunk on the horizontal axes. Plugin parts read and write it with the indexer.
- Listed in World generation
- Inherits or implements
IDisposable - Nested types
Value - Attributes
DefaultMember - Documented in Caves
Constructors
| Member | What it is |
|---|---|
MapChunkLayer(MapChunk chunk, PluginInstance plugin) | Creates a MapChunkLayer from chunk and plugin. |
Fields
2 private and internal fields
Properties
| Member | What it is |
|---|---|
MapChunk Chunk { get; } | The map chunk the layer belongs to. |
float this[int x, int y, int z] { get; set; } | Value at x, y, z. X and z can go from MinXZ to MaxXZ (into the overflow border). |
int LayerOverflowXZ { get; } | Width of the extra border around the chunk, from the plugin settings. |
int MaxXZ { get; } | Exclusive upper bound for x and z: chunk size plus the overflow. |
int MaxY { get; } | Exclusive upper bound for y: the plugin's layer height. |
int MinXZ { get; } | Lowest x and z index: minus the overflow. |
int MinY { get; } | Lowest y index: 0. |
List<MapChunkLayer.Value> NonZero { get; private set; } | The list from the last CreateAllNonZeroList call. |
PluginInstance Plugin { get; } | The plugin instance that owns this layer. |
Methods
| Member | What it is |
|---|---|
List<MapChunkLayer.Value> CreateAllNonZeroList() | Builds and stores the list of cells above 0, if the plugin asks for one. Returns null otherwise. |
void Dispose() | Drops the value grid. |
Used in
Members of other types that take, return or hold a MapChunkLayer:
ConstrainedSpawnerDisplay.Spawn, GameObjectDisplay.floor, PolygonChunkDisplay.GetDepth, WallAlignedDisplay.floor, WallAlignedDisplay.floorPlanLayer, MapChunk.GetLayer, MapChunk.layers, MapChunkDisplay.Initialize, MapChunkDisplay.layer, ApplyElementInstance.Modify, BlobEdgeInstance.Modify, BlurInstance.Modify, CellularAutomataInstance.Modify, CircleInstance.Modify, CopyPartInstance.Modify, CurveInstance.Modify, LineDraw.Cylinder3D, LineDraw.ThickLine2D, LogRangeInstance.Modify, MapGeneratorPartInstance<T>.Modify, MaskInstance.Modify, OperationPartInstance.Modify, RandomNoiseInstance.Modify, RoofHoleInstance.Modify, RoomFixesInstance.FloodFill, RoomFixesInstance.Modify, SimplexNoisePartInstance.Modify, StretchInstance.Modify, CavePopulationSpawnInformation.CavePopulationSpawnInformation, CavePopulationSpawnInformation.floor, CavePopulationSpawnInformation.layer, SpawnAreaDisplay.Spawn, SpawnPointsDisplay.Spawn.