Chris' Tutorials
Docs/Grid Placement

Class

TerrainDemolishData

Generated GDScript class reference for GridPlacement.TerrainDemolishData.

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.

Specialized [ManipulationData] for the terrain DEMOLISH action. Carries the terrain name, cells to erase, target map, and cell count for demolish operations. Exposes a [method veto] hook that listeners can call from the [signal PlacementState.pre_terrain_demolish] callback to cancel the demolition. Lifecycle (5.1.0-P): [codeblock] try_demolish_terrain: status = STARTED emit pre_terrain_demolish(data) # listeners may call data.veto() if data.vetoed: status = CANCELED return erase_cells() emit post_terrain_demolish(data) emit post_terrain_removed(data) status = FINISHED [/codeblock]

Source: addons/grid_placement/placement/terrain/terrain_demolish_data.gd

Syntax

class TerrainDemolishData extends ManipulationData

Members

NameKindSummary
terrain_namePropertyThe terrain name being demolished (e.g. "dungeon_floor"). Resolved from the TileSet at erase time.
cellsPropertyThe grid cells to erase.
target_mapPropertyThe TileMapLayer where the terrain will be erased.
vetoedPropertyTrue after any [signal PlacementState.pre_terrain_demolish] listener calls [method veto]. [code]try_demolish_terrain[/code] checks this flag after the signal fires and short-circuits to [enum PlacementEnums.Status.CANCELED] when set, preserving the terrain.
build_costPropertyBuildCost snapshot for the demolish — set by terrain_placement_service when the demolish is initiated, so refunder pool has a stable value at handler time. Null cost → no refund (legacy / no-cost terrains), per AGENTS.md non-blocking policy.
vetoMethod

Source

addons/grid_placement/placement/terrain/terrain_demolish_data.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs