Enum MapCellType
Predefined integer-backed cell type constants used by the map generation utility to classify individual grid cells produced by ProceduralMapGenerator algorithms.
Because the enum is backed by int, its values can be stored directly in an
ScyllaSquareGrid<int> or ScyllaHexGrid<int> without any
cast overhead at read-back time. Cast to int when writing:
<pre><code class="lang-csharp">grid[coord] = (int)MapCellType.Floor;</code></pre>
Cast back to <code>MapCellType</code> when reading:
<pre><code class="lang-csharp">var type = (MapCellType)grid[coord];</code></pre>
The map generation algorithms only distinguish between two semantic roles during generation: walls (stored as WallValue) and floors (stored as FloorValue). The remaining values (Corridor, Door, Spawn) are written during post-processing steps or can be applied manually after generation.
Custom integer values outside this enum are fully supported. Only WallValue and FloorValue need to correspond to meaningful cell types; all other values are transparent to the algorithms and can encode game-specific tile categories (e.g. water, lava, stairs).
Namespace: Scylla.Core.Util.ProceduralMapGen
Assembly: ScyllaCore.dll
Syntax
public enum MapCellType
Fields
| Name | Description |
|---|---|
| Corridor | A passable cell that forms part of a corridor segment connecting two rooms. Corridor
cells are carved by the BSP and Room-and-Corridor algorithms and are tracked in
Cells. They are intentionally distinguished from
Floor cells so that gameplay systems can apply different visuals or
behavior (e.g. narrower passageways, different lighting). Integer value: |
| Door | A transition cell placed at the boundary between a room and a corridor. Door cells are
written during door-placement post-processing when
DoorValue is configured. They indicate logical entry
and exit points that gameplay systems can use to spawn door props or trigger transition
logic. Integer value: |
| Empty | An uninitialized or otherwise empty cell that has not been assigned a specific role
by the generation algorithm. Grids are typically pre-filled with Wall
before carving begins, so |
| Floor | A passable open cell located within the interior of a detected room. Floor cells are
the primary carving target of all ProceduralMapGenerator algorithms.
|
| Spawn | A suggested player or entity spawn point identified by post-processing when
FindSpawns is |
| Wall | An impassable solid cell that blocks movement. Map generation algorithms initialize
the entire grid to this value before carving passable areas. |