Table of Contents

Namespace MoonBark.GridPlacement.Core.Events

Classes

DomainEvent

Base class for all domain events in the Grid Placement system.

EventBus

Base class for domain event buses providing common publish functionality. Engine-agnostic implementation with no Godot or Unity dependencies.

Purpose: Reduces boilerplate by providing a common Publish method pattern that invokes event handlers if they are subscribed.

Architecture Boundary: Core ECS systems → EventBus implementations → Engine adapter bridges

GPEvent

Base class for all Godot-specific placement events.

GridCellChangedEvent

Event raised when a specific grid cell changes.

GridEventBus

Pure C# event bus for grid operations. Engine-agnostic implementation with no Godot or Unity dependencies.

Usage Recommendation: This Core event bus is designed for:

  • Headless servers: Use directly for grid event handling without engine runtime
  • Core systems: ECS grid systems publish events through this bus
  • Unit tests: Subscribe to events in xUnit/NUnit tests without engine dependencies
  • Dedicated servers: Run grid occupancy and synchronization on server

Do NOT use in engine-dependent code: For Godot or Unity clients, use the engine-specific signal bus adapters (GridSignalBus in Godot) that bridge these Core events to engine signals. This keeps engine-specific code isolated in the adapter layer.

Architecture Boundary: Core ECS systems → GridEventBus → Engine adapter bridges → Engine signals (Godot signals, UnityEvents, etc.)

GridOccupancyChangedEvent

Event raised when grid occupancy changes at a position.

GridSizeChangedEvent

Event raised when the grid size changes.

GridUpdatedEvent

Event raised when the grid is updated.

IndicatorEvaluationCompletedEvent

Event raised when per-cell indicator evaluation has completed for a preview instance.

IndicatorEvaluationRequestedEvent

Event requesting per-cell indicator evaluation for a preview instance.

ManipulationCancelledEvent

Event raised when a manipulation operation is cancelled.

ManipulationEventBus

Pure C# event bus for manipulation operations. Engine-agnostic implementation with no Godot or Unity dependencies.

Usage Recommendation: This Core event bus is designed for:

  • Headless servers: Use directly for manipulation event handling without engine runtime
  • Core systems: ECS manipulation systems publish events through this bus
  • Unit tests: Subscribe to events in xUnit/NUnit tests without engine dependencies
  • Dedicated servers: Run manipulation logic (move, rotate, flip, demolish) on server

Do NOT use in engine-dependent code: For Godot or Unity clients, use the engine-specific signal bus adapters (ManipulationSignalBus in Godot) that bridge these Core events to engine signals. This keeps engine-specific code isolated in the adapter layer.

Architecture Boundary: Core ECS systems → ManipulationEventBus → Engine adapter bridges → Engine signals (Godot signals, UnityEvents, etc.)

ManipulationFailedEvent

Event raised when a manipulation operation fails.

ManipulationStartedEvent

Event raised when a manipulation operation starts.

ManipulationSuccessEvent

Event raised when a manipulation operation completes successfully.

ManipulationUpdatedEvent

Event raised when a manipulation operation updates.

PlaceableSelectedEvent

Event raised when a placeable has been selected.

PlacementApproved

Event raised when a placement has been approved and is ready for ECS entity creation.

PlacementCancelledEvent

Event raised when a placement operation is cancelled.

PlacementEventBus

Pure C# event bus for placement operations. Engine-agnostic implementation with no Godot or Unity dependencies.

Usage Recommendation: This Core event bus is designed for:

  • Headless servers: Use directly for placement event handling without engine runtime
  • Core systems: ECS systems and services publish events through this bus
  • Unit tests: Subscribe to events in xUnit/NUnit tests without engine dependencies
  • Dedicated servers: Run placement logic on server without rendering

Do NOT use in engine-dependent code: For Godot or Unity clients, use the engine-specific signal bus adapters (PlacementSignalBus in Godot) that bridge these Core events to engine signals. This keeps engine-specific code isolated in the adapter layer.

Architecture Boundary: Core ECS systems → PlacementEventBus → Engine adapter bridges → Engine signals (Godot signals, UnityEvents, etc.)

PlacementFailedEvent

Event raised when a placement (build) action fails.

PlacementPreviewUpdatedEvent

Event raised when placement preview data changes and indicator evaluation should be refreshed.

PlacementSuccessEvent

Event raised when a placement (build) action is successful.

PlacementValidatedEvent

Event raised when a placement has been validated.

ServiceErrorEvent

Event raised when a service encounters an error

ServiceEvent

Base class for service-related events

ServiceStartedEvent

Event raised when a service starts

ServiceStoppedEvent

Event raised when a service stops

TargetAcquiredEvent

Event raised when a target is acquired.

TargetChangedEvent

Event raised when a target changes position.

TargetLostEvent

Event raised when a target is lost.

TargetingEventBus

Pure C# event bus for targeting operations. Engine-agnostic implementation with no Godot or Unity dependencies.

Usage Recommendation: This Core event bus is designed for:

  • Headless servers: Use directly for targeting event handling without engine runtime
  • Core systems: ECS targeting systems publish events through this bus
  • Unit tests: Subscribe to events in xUnit/NUnit tests without engine dependencies
  • Dedicated servers: Run targeting logic on server without rendering

Do NOT use in engine-dependent code: For Godot or Unity clients, use the engine-specific signal bus adapters (TargetingSignalBus in Godot) that bridge these Core events to engine signals. This keeps engine-specific code isolated in the adapter layer.

Architecture Boundary: Core ECS systems → TargetingEventBus → Engine adapter bridges → Engine signals (Godot signals, UnityEvents, etc.)

TargetingStateChangedEvent

Event raised when targeting state changes.

TileHoveredEvent

Event raised when the cursor hovers over a tile.

TileInfoEventBus

Event bus for tile information updates.

TileInfoUpdatedEvent

Event raised when tile information is updated.

TileOccupancyChangedEvent

Event raised when tile occupancy changes.

Structs

CellIndicatorEvaluation

Per-cell indicator evaluation result.

PreviewInstanceId

Stable identifier for a preview instance lifecycle.

ValidationCompletedEvent

Event raised when validation has been completed for an entity.

ValidationRequestEvent

Event raised when a placement validation should be performed. Published when cursor position changes (preview) or when confirm is pressed (final).