Table of Contents

Namespace MoonBark.GridPlacement.Core.Services.Mode

Classes

CoreModeManager

Manages grid placement modes and transitions between them. Service that manages transitions between different grid modes (Place, Paint, Remove, etc.). Encapsulates the core business logic of what happens during a mode switch.

NOTE: This class currently depends on PlacementSystem which has been moved to MoonBark.GridPlacement.ECS. During Phase 3, this will be refactored to use IPlacementCoreService instead.

Responsibility: This is an authoritative service. It does not own the mode state itself (ModeService does), but it is responsible for the *effects* of changing modes (e.g., stopping an active placement when switching to Remove mode).

Architecture: Pure Core implementation with no Godot dependencies. Accepts dependencies via constructor injection, enabling testability and reuse.

ModeService

Default implementation of IModeService. Owns a single MoonBark.GridPlacement.Core.Services.Mode value and raises ModeChangedEvent when it changes.

Interfaces

IModeService

Core service interface for managing the current GridBuilding mode. Uses the MoonBark.GridPlacement.Core.Services.Mode enum as the single source of truth.