Interface IPlaceableCatalog
- Namespace
- MoonBark.GridPlacement.Core.Catalog
- Assembly
- MoonBark.GridPlacement.Core.dll
Service interface for managing available placeables. Pure C# contract with no Godot dependencies.
public interface IPlaceableCatalog
Methods
Add(PlaceableEntry)
Adds a placeable to the catalog.
void Add(PlaceableEntry entry)
Parameters
entryPlaceableEntryEntry to add.
AddSequence(PlaceableSequence)
Adds a placeable sequence to the catalog.
void AddSequence(PlaceableSequence sequence)
Parameters
sequencePlaceableSequenceSequence to add.
GetAll()
Gets all available placeables.
IReadOnlyList<PlaceableEntry> GetAll()
Returns
- IReadOnlyList<PlaceableEntry>
Read-only list of all placeable entries.
GetByCategory(string)
Gets placeables filtered by category.
IReadOnlyList<PlaceableEntry> GetByCategory(string category)
Parameters
categorystringCategory to filter by (case-insensitive).
Returns
- IReadOnlyList<PlaceableEntry>
Read-only list of matching entries.
GetSequence(string)
Gets a placeable sequence by ID.
PlaceableSequence? GetSequence(string id)
Parameters
idstringSequence ID.
Returns
- PlaceableSequence
The sequence if found, null otherwise.
Remove(string)
Removes a placeable from the catalog.
bool Remove(string id)
Parameters
idstringID of the entry to remove.
Returns
- bool
True if removed, false if not found.
TryGet(string, out PlaceableEntry?)
Tries to get a placeable by ID.
bool TryGet(string id, out PlaceableEntry? entry)
Parameters
idstringPlaceable ID.
entryPlaceableEntryThe entry if found, null otherwise.
Returns
- bool
True if found, false otherwise.