Manipulatable
Summary
Section titled “Summary”Component node that makes a object movable, demolishable, or other system actions to be performed on the object
Constants
Section titled “Constants”const keep_during_preview = trueComponent node that makes a object movable, demolishable, or other system actions to be performed on the object
Special marker that tells building system to keep this script during preview
Signals
Section titled “Signals”signal manipulation_finished( old_transform: Transform2D, new_transform: Transform2D )Emitted when this object’s manipulation is finished (placed/moved) This allows the root object to respond to being manipulated Parameters: - old_transform: Transform2D - The transform before manipulation - new_transform: Transform2D - The transform after manipulation
Properties
Section titled “Properties”settings: ManipulatableSettingsRule settings for replacing this object in move mode, etc
root: Node:The root of the object that should be manipulated by any actions. This manipulatable component is usually a child of the root.
Methods
Section titled “Methods”func resolve_gb_dependencies( p_container: GBCompositionContainer )func is_root_hierarchy_valid( ) -> boolReturns true if the configured root is an ancestor (direct or indirect) of this Manipulatable node.
func create_copy( p_name_postfix: String ) -> ManipulatableCreates a copy of the manipulatable root with the specified name postfix. This does NOT set the parent of the root and returns the copied manipulatable.
p_name_postfix: String - Name postfix to append to the duplicated root’s namefunc get_move_rules( ) -> Array[TileCheckRule]Returns the tile check rules that apply when moving this object. Gets move rules from the manipulatable settings, or empty array if no settings.
func is_demolishable( ) -> boolReturns true if this object can be demolished based on its settings. Checks the demolishable flag in the manipulatable settings.
func is_movable( ) -> boolReturns true if this object can be moved based on its settings. Checks the movable flag in the manipulatable settings.
func validate_setup( ) -> boolValidates that the manipulatable component is properly configured. Returns true if setup is valid, false if required properties are missing.
func get_issues( ) -> Array[String]func _on_root_exiting( )
Source
Section titled “Source”addons/grid_building/components/manipulatable.gd
This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.