Grid Placement

PlacementWorkflowOrchestrator

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: systems/orchestrator/placement_workflow_orchestrator.gd

Version: 5.1

class_name: PlacementWorkflowOrchestrator extends: RefCounted

Signals

(none)

Exports

(none)

Methods

  • _init()

  • start_session()

    • Starts a new placement session.
  • item_id: stable identifier for selection (inventory id, catalog id, etc.).

  • placeable: the selected placeable resource.

Side-effects:

  • Updates internal session state.
  • Requests mode/service setup via adapter (enter_build_mode).

Returns:

  • A GBOrchestratorOutput describing current preview/indicator state and effects to apply.
  • 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 current selection to the next 90-degree step.

Notes:

  • Rotation is stored as float degrees and interpreted by the adapter.
  • Returns empty output if there is no active session.
  • confirm()
    • Confirms (commits) the current placement.

Behavior:

  • Re-runs the workflow refresh to ensure validation is current.
  • If invalid, returns output with feedback-only effect.
  • If valid, appends commit + feedback effects.

Notes:

  • This does not directly modify the scene/world; an effects applier must interpret the COMMIT_PLACEMENT effect.
  • cancel()
    • Cancels the session and returns effects that clear preview/indicator visuals.

Behavior:

  • Resets session state.
  • Emits clear_preview and clear_indicator effects.
  • _refresh_workflow()
    • Internal: runs the pipeline Targeting -> Preview -> Validation -> Indicator.

Preconditions:

  • Session must be active.
  • Selected placeable must be set.
  • A targeting snapshot must be present.

Returns:

  • Empty output when preconditions are not met.
  • Otherwise a fully populated GBOrchestratorOutput with effects.
  • _empty_output()