Table of Contents

Interface IPlaceableRuntimeCatalog

Namespace
MoonBark.GridPlacement.Core.Catalog
Assembly
MoonBark.GridPlacement.Core.dll

Service interface for managing runtime placeable data. Stores full Placeable objects for use by placement systems and ECS. Pure C# contract with no Godot dependencies.

public interface IPlaceableRuntimeCatalog

Properties

Count

Gets the number of placeables in the catalog.

int Count { get; }

Property Value

int

Methods

Add(Placeable)

Adds a placeable to the catalog.

void Add(Placeable placeable)

Parameters

placeable Placeable

Placeable to add.

Clear()

Clears all placeables from the catalog.

void Clear()

GetAll()

Gets all available placeables.

IReadOnlyList<Placeable> GetAll()

Returns

IReadOnlyList<Placeable>

Read-only list of all placeables.

Merge(IPlaceableRuntimeCatalog, CatalogMergeStrategy)

Merges placeables from another catalog into this one.

CatalogMergeResult Merge(IPlaceableRuntimeCatalog otherCatalog, CatalogMergeStrategy strategy)

Parameters

otherCatalog IPlaceableRuntimeCatalog

The catalog to merge from.

strategy CatalogMergeStrategy

The merge strategy to use.

Returns

CatalogMergeResult

Result of the merge operation.

Merge(IEnumerable<Placeable>, CatalogMergeStrategy)

Merges a collection of placeables into this catalog.

CatalogMergeResult Merge(IEnumerable<Placeable> placeables, CatalogMergeStrategy strategy)

Parameters

placeables IEnumerable<Placeable>

The placeables to merge.

strategy CatalogMergeStrategy

The merge strategy to use.

Returns

CatalogMergeResult

Result of the merge operation.

Remove(string)

Removes a placeable from the catalog.

bool Remove(string id)

Parameters

id string

ID of the placeable to remove.

Returns

bool

True if removed, false if not found.

TryGet(int, out Placeable?)

Tries to get a placeable by its deterministic integer ID hash. Specifically used by ECS hotpath systems to avoid string mapping delays.

bool TryGet(int idHash, out Placeable? placeable)

Parameters

idHash int
placeable Placeable

Returns

bool

TryGet(string, out Placeable?)

Tries to get a placeable by its human-readable ID. Used by bridge layers and UI components.

bool TryGet(string id, out Placeable? placeable)

Parameters

id string
placeable Placeable

Returns

bool