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
Methods
Add(Placeable)
Adds a placeable to the catalog.
void Add(Placeable placeable)
Parameters
placeablePlaceablePlaceable 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
otherCatalogIPlaceableRuntimeCatalogThe catalog to merge from.
strategyCatalogMergeStrategyThe 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
placeablesIEnumerable<Placeable>The placeables to merge.
strategyCatalogMergeStrategyThe merge strategy to use.
Returns
- CatalogMergeResult
Result of the merge operation.
Remove(string)
Removes a placeable from the catalog.
bool Remove(string id)
Parameters
idstringID 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
Returns
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)