Chris' Tutorials
Docs/Grid Placement

Class

PlacementSystem

Generated GDScript class reference for GridPlacement.PlacementSystem.

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 of objects in the game world. Handles preview, placement validation, and placement actions. Uses tile collision indicators to show valid/invalid spots before placement. Checks all rules before adding objects to the world and emits signals for placement success or failure. @deprecated Will be removed in 6.1. Add a GridPlacementHost to your scene, set a PlacementSession on a GridPositioner2D, and the positioner will register the session with the host. The host owns runtime input. See the 6.0 migration guide for the path.

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

Syntax

class PlacementSystem extends PlacementSystemBase

Members

NameKindSummary
PlaceModeFieldExplicit build mode for the building system (5.2+) NONE: No build mode active OBJECT: Placing scene objects via ScenePlacementEntry resources TERRAIN: Painting terrain tiles by terrain name, resolved against the TileSet SSOT DECORATION: Kept for backward compatibility but aliases OBJECT Canonical name for the placement mode enum. Use [PlaceMode.OBJECT] etc. in new code — `BuildMode` is kept as a backward-compatible alias for the same enum (the names are interchangeable; values are identical).
build_mode_changedEventRouter-facing submode inside global PLACE mode. NONE means the user is in PLACE but has not chosen terrain or objects yet. Emitted when the build mode changes
place_submode_changedEventEmitted when the router-facing place submode changes (see PlaceSubmode).
create_with_injectionMethod
systemProperty
issuesProperty
loggerProperty
create_with_sessionMethod
systemProperty
issuesProperty
placement_polygonsPropertyCollision polygons for placement indicators.
preview_layerPropertyPreview layer index for buildable/unbuildable tiles.
selected_placeablePropertyCurrently selected placeable resource. Proxy to [member PlacementSession.selected_placeable] when wired through a [PlacementContainer]. Reads and writes both legs so legacy scenes and session-built variants behave identically. The session is the canonical home: writes trigger [signal PlacementSession.placeable_selected] which the host observes in [method GridPlacementHost.configure]. The backup backing field handles tests/legacy paths that run without a [PlacementContainer]. This closes the terrain/object cross-leak where a smithy pick persisted into a fence placement because the system field was the divergent source — the band-aid revert target.
selected_terrain_namePropertyCurrently selected terrain name (new path). Empty when no terrain is selected. Resolved against the target TileMapLayer's TileSet at paint-time. Proxy to [member PlacementSession.selected_terrain_name] when wired through a [PlacementContainer], else falls back to [member _selected_terrain_name_backing]. Symmetric to [member selected_placeable] — also closes the dual-write band-aid where the system wrote to both itself and the session on every select.
selected_terrain_entryPropertyThe currently selected terrain entry (if any).
selected_terrain_palettePropertyThe currently selected terrain palette (if any).
current_modePropertyCurrent explicit build mode (5.2+) Computed from [member _place_machine].
current_place_submodePropertyCurrent router-facing submode inside global PLACE mode. Computed from [member _place_machine].
brush_statePropertyBrush state accessor (read-only). The actual [BrushState] is owned by [member _brush_coordinator] (P4 god-class extraction); this property preserves the public test-facing API that pre-existed the extraction so test code can still read `building_system.brush_state` to introspect drag/pending state. Returns null if the coordinator has not been constructed yet (e.g. before [method resolve_placement_dependencies]).
indicators_groupPropertyParent node for collision indicators.
get_building_stateMethod
get_targeting_stateMethod
get_statesMethod
get_loggerMethod
set_loggerMethod
get_actionsMethod
get_indicator_contextMethod
set_statesMethod
set_actionsMethod
set_indicator_contextMethod
WARNING_INVALID_PLACEABLEField
WARNING_NO_PREVIEWField
is_ready_to_placeMethod
r_ctxProperty
is_ready_to_paint_terrainMethod
r_ctxProperty
get_terrain_preview_cellsMethod
host_cellsProperty
positionerProperty
current_cellProperty
get_host_terrain_preview_cellsMethod
host_brushProperty
positionerProperty
current_cellProperty
reportProperty
try_place_terrain_brushMethod
target_mapProperty
positionerProperty
cellProperty
reportProperty
target_mapProperty
reportProperty
positionerProperty
reportProperty
current_cellProperty
cellsProperty
reportProperty
placed_countProperty
skipped_countProperty
skipped_reasonsProperty
MAX_SKIPPED_REASONSField
world_posProperty
cell_reportProperty
issuesProperty
reportProperty
summary_reportProperty
set_brush_shapeMethod
exit_build_modeMethod
get_terrain_serviceMethod
get_terrain_contextMethod
set_hostMethod
get_hostMethod
get_manipulation_serviceMethod
manip_settingsProperty
get_grid_targeting_serviceMethod
enter_place_routerMethod
set_place_submodeMethod
resolve_placement_dependenciesMethod
settingsProperty
settingsProperty

Source

addons/grid_placement/systems/building/placement_system.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs