Chris' Tutorials
Docs/Grid Placement

Class

PlaceModeMachine

Generated GDScript class reference for GridPlacement.PlaceModeMachine.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

Manages placement mode state as a proper state machine. Replaces the overlapping BuildMode and PlaceSubmode enums in PlacementSystem, eliminating the mode-flap bug class caused by inconsistent state combinations and the "no place-pending value" hack. [b]States:[/b] IDLE — Not placing anything. Maps to ModeState.OFF ROUTER — PLACE mode active, waiting for tool/category selection OBJECT — Actively placing an object (placeable selected) TERRAIN — Actively painting terrain (terrain name selected) [b]Two-way sync with ModeState:[/b] Out: IDLE → OFF, all others → PLACE (canonical) In: non-PLACE/BUILD modes force IDLE (MOVE/DEMOLISH/INFO/OFF) Scene-free (extends RefCounted). Directly unit-testable.

Source: addons/grid_placement/systems/building/place_mode_machine.gd

Syntax

class PlaceModeMachine extends RefCounted

Members

NameKindSummary
state_changedEventPlacement mode states. Emitted when placement state changes.
current_stateProperty
set_mode_stateMethod
enter_idleMethod
enter_routerMethod
enter_objectMethod
enter_terrainMethod
is_activeMethod
is_routerMethod
is_placing_objectMethod
is_painting_terrainMethod
old_stateProperty

Source

addons/grid_placement/systems/building/place_mode_machine.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs