Chris' Tutorials
Docs/Grid Placement

Class

DemolishData

Generated GDScript class reference for GridPlacement.DemolishData.

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 DEMOLISH action. Carries a live [Manipulatable] reference for pre-destroy inspection and exposes a [method veto] hook that listeners can call from the [signal ManipulationState.pre_demolish] callback to cancel the demolition. The base [member ManipulationData.target] is also populated (it was historically [code]null[/code] on the demolish path) so existing consumers that walk the data shape don't have to special-case demolish. Lifecycle (5.1.0-C): [codeblock] try_demolish: status = STARTED emit pre_demolish(data) # listeners may call data.veto() if data.vetoed: status = CANCELED return root.queue_free() status = FINISHED [/codeblock]

Source: addons/grid_placement/systems/manipulation/manipulation_data_demolish.gd

Syntax

class DemolishData extends ManipulationData

Members

NameKindSummary
demolish_targetPropertyLive [Manipulatable] that will be destroyed if no listener vetoes. This is the same reference that flows through [member ManipulationData.source] but exposed explicitly on the demolish data so listeners can read it without walking the data shape.
vetoedPropertyTrue after any [signal ManipulationState.pre_demolish] listener calls [method veto]. [code]try_demolish[/code] checks this flag after the signal fires and short-circuits to [enum PlacementEnums.Status.CANCELED] when set, preserving the [Node] from [code]queue_free[/code].
vetoMethod

Source

addons/grid_placement/systems/manipulation/manipulation_data_demolish.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs