Class ManipulationSettings
- Namespace
- GridPlacement.GDScript
- Assembly
- MoonBark.GridPlacement.GDScript.dll
Settings concerning moving objects within the game world
class ManipulationSettings extends PlacementResource
Properties
rotate_increment_degrees
Amount to rotate objects with every step of call to left or right rotation
@export_range(0.0, 360.0, 0.01) var rotate_increment_degrees = 90.0:
enable_demolish
Allows objects which that have a Manipulatable component with demolish enabled to be removed by the demolish manipulation function
@export var enable_demolish: bool
demolish_while_moving
Whether an object that is selected for moving can be demolished while is it being moved in move mode
@export var demolish_while_moving: bool
enable_rotate
Allows the building system to rotate objects left and right during build mode
@export var enable_rotate = true:
enable_flip_horizontal
Allows the building system to flip objects horizontally during build mode
@export var enable_flip_horizontal = true:
enable_flip_vertical
Allows the building system to flip objects vertically during build mode
@export var enable_flip_vertical = true:
reset_transform_on_manipulation
Whether the transform of the manipulation target object should be reset to Transform2D.IDENTITY when starting a manipulation [br][br] This may be most useful when moving RigidBody2Ds or other objects that rotate during gameplay to make placing to a new location clean as the original scene designates.
@export var reset_transform_on_manipulation = false
disable_layer_in_manipulation
Whether you want to disable a layer when a manipulation like a move starts until it is canceled or finished
@export var disable_layer_in_manipulation = false
disabled_physics_layer
Layer that you want disabled in source object during manipulation until the manipulation is finished or canceled. [br][br] Recommended to use a placement only layer and not to disable the layer that effects physics of objects currently moving around in the scene [br][br] Alternatively, you could put game into a pause state on started signal from ManipulationState
@export_range(0, 32, 1) var disabled_physics_layer: int
move_suffix
String to append to an object's move copy node name to differentiate it from the original source object
@export var move_suffix: String = ""
demolish_success
Message displayed when demolish succeeds
@export var demolish_success = "%s was demolished successfully."
failed_not_demolishable
Message when target cannot be demolished
@export var failed_not_demolishable = "%s is not demolishable"
demolish_already_deleted
Message when demolish target was already deleted
@export var demolish_already_deleted = "Target of demolish_data %s was already deleted."
demolish_canceled
Message when a [signal ManipulationState.pre_demolish] listener calls [code]data.veto()[/code] to cancel the demolish. Additive in 5.1.0-C.
@export var demolish_canceled = "Demolish of %s was canceled."
move_started
Message when move action starts
@export var move_started = "Moving %s"
move_success
Message displayed when move succeeds
@export var move_success = "%s moved to new location successfully."
failed_to_start_move
Message when move fails to start
@export var failed_to_start_move = "%s was unable to start move successfully."
no_move_target
Message when there is no move target
@export var no_move_target = "There is no target to move."
failed_placement_invalid
Message when placement at target location is invalid
@export var failed_placement_invalid = "Cannot place %s here."
all_succeeded
Message when all placement rules succeed
@export var all_succeeded = "All placement rules succeeded validation."
failed_to_setup_rules
Message when rule setup fails
@export var failed_to_setup_rules = "One or more rules failed to setup correctly."
target_not_rotatable
Message when target cannot be rotated
@export var target_not_rotatable = "%s cannot be rotated."
target_not_flippable_horizontally
Message when target cannot be flipped horizontally
@export var target_not_flippable_horizontally = "%s target cannot be flipped horizontally."
target_not_flippable_vertically
Message when target cannot be flipped vertically
@export var target_not_flippable_vertically = "%s target cannot be flipped vertically."
invalid_data
Message when manipulation data is invalid
@export var invalid_data = "%s is not valid. Cannot move object"
failed_manipulation_state_invalid
Message when manipulation state validation fails
@export var failed_manipulation_state_invalid = "Manipulation state failed to validate. Check warnings for possible missing properties."
failed_object_not_manipulatable
Message when object is not manipulatable
@export var failed_object_not_manipulatable = "%s is not manipulatable."
failed_object_not_movable
Message when object is not movable
@export var failed_object_not_movable = "%s is not movable"
failed_root_not_assigned
Message when root node is not assigned
@export var failed_root_not_assigned = "%s's root has not been assigned"
failed_root_not_node2D
Message when root is not a Node2D
@export var failed_root_not_node2D = "%s's root is not a Node2D"
failed_no_target_object
Message when there is no target object
@export var failed_no_target_object = "There is no target object."
target_not_manipulatable
Message when target is not manipulatable
@export var target_not_manipulatable = "Target is not manipulatable."
unsupported_node_type
Message for unsupported node types
@export var unsupported_node_type = "Unsupported node type %s"
issues
var issues: Array[String] = []
issues
var issues: Array[String] = []
Methods
get_editor_issues
func get_editor_issues() -> Array[String]:
Returns
get_runtime_issues
func get_runtime_issues() -> Array[String]: