ManipulationWorkflowOrchestrator
AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: systems/orchestrator/manipulation_workflow_orchestrator.gd
Version: 5.1
class_name: ManipulationWorkflowOrchestrator
extends: RefCounted
Summary
Orchestrates the “Manipulation” workflow (Move/Rotate/Demolish) as a pure orchestration layer.
Behavior contract:
- Owns a lightweight manipulation session (source node, current rotation, last targeting snapshot).
- Produces pure data models (
GBPreviewModel,GBIndicatorModel) and declarative effects (Array[GBOrchestratorEffect]) that an external applier can apply to the scene. - Does NOT reference or mutate gameplay state directly (no grid writes, no node transforms).
- Does NOT manage scene lifetime; it only requests changes via effects.
Responsibility boundaries:
- Indicator model construction: delegated to
ManipulationWorkflowAdapter. - Applying effects (moving previews, committing a move, playing sounds, etc.): performed by a separate effects applier / system.
Signals
(none)
Exports
(none)
Methods
_init()start_session()- Starts a manipulation session.
Inputs:
source_node: the node being manipulated (used as identity only; no mutation is performed here).action: manipulation action enum/int selected by input routing.
Returns:
- A
GBOrchestratorOutputwith effects that begin manipulation and present initial visuals. update()- Updates the workflow with a new targeting snapshot (for example: pointer moved).
Returns:
- Empty output if there is no active session.
- Otherwise a refreshed
GBOrchestratorOutput. rotate()- Rotates the active manipulation preview by 90 degrees.
Notes:
- Rotation is stored in degrees (float) because manipulation often aligns with world rotation.
- Returns empty output if there is no active session.
confirm()- Confirms (commits) the current manipulation.
Behavior:
- Re-runs the workflow refresh to ensure preview state is current.
- If preview indicates invalid state, returns feedback-only effect.
- If valid, appends commit + feedback effects.
- Resets session state after successful commit request.
Notes:
- This does not directly modify the scene/world; an effects applier must interpret
the
COMMIT_MANIPULATIONeffect. cancel()- Cancels the session and returns effects that clear manipulation visuals.
Behavior:
- Resets session state.
- Emits
cancel_manipulation+clear_indicatoreffects. _refresh_workflow()- Internal: builds preview + indicator models and returns effects.
Returns:
- Empty output when session is not active.
- Hidden output (or initial effects only) when no snapshot is available.
_empty_output()