The manipulation state holds reference to the object being manipulated and its temporary manipulated copy. It also is the source of signals regarding object manipulation like when moving or demolishing an object is started, canceled, or stopped.
Source: addons/grid_placement/systems/manipulation/manipulation_state.gd
Syntax
class ManipulationState extends PlacementResourceMembers
| Name | Kind | Summary |
|---|---|---|
data_changed | Signal | Emitted when the active manipulation on an object changes Null means there is no manipulation currently active on the state. |
active_manipulatable_changed | Signal | The manipulatable that is being hovered over |
active_target_node_changed | Signal | Signal for when the currently active target node changes |
parent_changed | Signal | When the node for performing transform adjustments to (rotate, flip, etc) during a manipulation changes |
action_performed | Signal | Emitted when any manipulation action is performed (started, finished, failed, or canceled). Route on [member ManipulationData.status]. |
pre_demolish | Signal | Emitted after demolish validation passes and before [code]queue_free[/code] runs. Listeners may call [code]data.veto()[/code] from this callback to cancel the demolition; the CANCELED status is then emitted and the [Node] is preserved. The data is always a [DemolishData] (the demolish path is the only path that fires this signal — move uses [signal pre_move]). Additive in 5.1.0-C; existing [code]started[/code] / [code]finished[/code] / [code]failed[/code] timing is unchanged. |
pre_move | Signal | Emitted after move validation passes and before the moved node's transform is mutated. Listeners may call [code]data.veto()[/code] to cancel the move; the plugin leaves the node in place and reports CANCELED. This is the move analogue of [signal pre_demolish] and the handoff point for game-owned authority that owns the authoritative transform/consequences. |
confirmed | Signal | Emitted when a manipulation action is confirmed |
refunders | Property | Registered [Refunder] consumers (5.1.0-D). Each is called from the [signal pre_demolish] handler with the live target and the [BuildCost] stamped at placement time; any refunder returning true vetoes the demolish. Consumers append on bootstrap: [code]container.get_states().manipulation.refunders.append(MyRefunder.new())[/code] |
suspend_action_emission | Method | |
resume_action_emission | Method | |
is_action_emission_suspended | Method | |
data | Property | Data of the active manipulation |
active_manipulatable | Property | The current targeted (hovered, etc) manipulatable component, if any |
active_target_node | Property | Compatibility alias required by older tests referencing 'current_target'. Accepts either a Manipulatable directly or a Node/Node2D whose descendant has a Manipulatable. |
m | Property | |
parent | Property | Node which is actually manipulated to effect all children including the active target node and any other nodes that need to move to be updated with the base The ManipulationParent node responsible for coordinating transforms during manipulation. Enforces ManipulationParent class to ensure proper transform coordination methods are available. This ensures indicators rotate/flip with manipulated objects via transform inheritance. |
parent_3d | Property | 3D mirror of [member parent]. |
get_manipulator | Method | |
set_targeted | Method | |
is_targeted_movable | Method | |
has_manipulation_parent | Method | |
validate_setup | Method | |
get_editor_issues | Method | |
get_runtime_issues | Method |