Skip to content

Class

PlacementActionData

Generated GDScript class reference for GridPlacement.PlacementActionData.

Status
Draft
Version
v6.0
Updated
Development docs generated from GDScript source

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

Values for an attempted placement action

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

Syntax

class PlacementActionData extends RefCounted

Members

NameKindSummary
INVALID_CELLField
placeablePropertyThe resource defining the rules and scene to instance for a placeable object
build_resourcePropertyThe active resource used for the build action. May be a ScenePlacementEntry. Terrain-name painting keeps the TileSet as SSOT and does not attach a duplicate terrain resource.
reportPropertyThe placement report from the attempted action
build_typePropertyType of build operation (SINGLE, DRAG, TERRAIN, or AREA)
terrain_namePropertySemantic terrain name for tile-paint actions (TERRAIN). The TileSet is the SSOT for terrain identity, so no separate terrain resource is attached; the name is the user-facing label for action-log output and similar listeners. Empty for non-terrain build types.
terrain_cellPropertyGrid cell where terrain was painted (TERRAIN actions only). This enables per-cell cost deduction, undo journaling, and effects. For non-terrain actions, this value is INVALID_CELL.
terrain_cell_countPropertyNumber of cells painted in this terrain operation (TERRAIN actions only). 0 with a successful report and placed == null acknowledges an unchanged paint. Otherwise 0 means the count is unknown (legacy callers). >1 means a multi-cell brush (LINE, RECTANGLE_FILL, FLOOD_FILL) was used.
attempted_countPropertyBulk object summary counts (AREA summaries only). attempted_count is how many cells the shape commit tried; placed_count is how many actually placed. Both 0 means this is not a bulk summary (single item or backward-compat path).
placed_countProperty
blocked_issuesPropertyFirst-issue text per blocked cell of a bulk summary (AREA summaries only). Sweeps skip invalid tiles but must not hide them: listeners combine these by normalized reason so one line names what failed and how often. Empty for full successes and backward-compat callers.
get_display_nameMethod
get_built_resourceMethod
is_tile_paintMethod
get_previewMethod
get_placed_positionMethod
build_terrain_actionMethod
build_object_actionMethod
build_bulk_object_actionMethod
dataProperty