Table of Contents

Struct TileTypeId

Namespace
MoonBark.GridPlacement.Core.Types
Assembly
MoonBark.GridPlacement.Core.dll

Strongly-typed identifier for tile types in the grid placement system. Represents the semantic tile type (e.g., "grass", "water", "stone") separate from scene objects which use PlaceableId.

TileTypeId lives in Core (pure C#) and maps to Godot-specific tile coordinates (TileSetId, SourceId, AtlasCoords) in the moonbark-idle layer via TileTypeMapping.

Data flow: Core ECS: entity.TileTypeId = "grass" (semantic) Godot Layer: TileTypeMapping.Resolve("grass") ? (TileSetId=0, SourceId=0, AtlasCoords=(0,0)) TileMapLayer.SetCell(position, SourceId, AtlasCoords)

public readonly record struct TileTypeId : IEquatable<TileTypeId>
Implements
Inherited Members

Constructors

TileTypeId(string)

Strongly-typed identifier for tile types in the grid placement system. Represents the semantic tile type (e.g., "grass", "water", "stone") separate from scene objects which use PlaceableId.

TileTypeId lives in Core (pure C#) and maps to Godot-specific tile coordinates (TileSetId, SourceId, AtlasCoords) in the moonbark-idle layer via TileTypeMapping.

Data flow: Core ECS: entity.TileTypeId = "grass" (semantic) Godot Layer: TileTypeMapping.Resolve("grass") ? (TileSetId=0, SourceId=0, AtlasCoords=(0,0)) TileMapLayer.SetCell(position, SourceId, AtlasCoords)

public TileTypeId(string Value)

Parameters

Value string

Fields

None

Represents an invalid/empty tile type.

public static readonly TileTypeId None

Field Value

TileTypeId

Properties

HasValue

Checks if this tile type is valid (non-empty).

public bool HasValue { get; }

Property Value

bool

Value

Gets the string value of the tile type ID.

public string Value { get; }

Property Value

string

Methods

FromString(string)

Creates a TileTypeId from a string.

public static TileTypeId FromString(string value)

Parameters

value string

Returns

TileTypeId

ToString()

Returns the string representation of the tile type ID.

public override string ToString()

Returns

string

Operators

implicit operator string(TileTypeId)

Implicit conversion from TileTypeId to string.

public static implicit operator string(TileTypeId id)

Parameters

id TileTypeId

Returns

string

implicit operator TileTypeId(string)

Implicit conversion from string to TileTypeId.

public static implicit operator TileTypeId(string value)

Parameters

value string

Returns

TileTypeId