Skip to content

Class

PlacementCommand

Generated GDScript class reference for GridPlacement.PlacementCommand.

Status
Current
Version
v6.0
Source updated
Active v6.0 guide line from Grid Placement repo
Generated on
2026-09-01

A backend/programmatic placement request. This is the headless entry point for consumers like Thistletide that need to submit an explicit placement command and receive a stable, typed, persistence-safe [PlacementLifecycleResult] without driving the placement UI or inspecting Godot nodes. The command is intentionally generic: Grid Placement never learns about pawns, GOAP, Bevy, or any gameplay policy. The caller attaches whatever correlation tokens it needs via [member correlation_context] — that dictionary is carried verbatim on the committed lifecycle result.

Source: addons/grid_placement/placement/placement_command.gd

Syntax

class PlacementCommand extends Resource

Members

NameKindSummary
operationPropertyThe lifecycle operation to perform. Maps directly to a [PlacementLifecycleResult] operation constant (StringName).
placeablePropertyThe placeable definition to attempt to commit.
targetPropertyFor SMOOTH placement: the world-space target position. For GRID placement: the target cell (as [Vector2i]).
rotationPropertyOptional rotation/orientation in radians (Z-axis for 2D/3D).
correlation_contextPropertyOpaque caller metadata (Thistletide attaches simulation_run_id, pawn_id, goal_id, plan_id, action_attempt_id, task_id, construction_site_id, etc.). This is NOT inspected by Grid Placement — it is surfaced verbatim on the committed [PlacementLifecycleResult.correlation_context].
sessionPropertyThe owning session. When null the host resolves the active/default session.
commitMethod
cmdProperty
cancelMethod
cmdProperty
removeMethod
cmdProperty