Grid Placement
Development ⚠️ GridPlacement 6.0 (GECS) is in active development. This is the GDScript ECS architecture.

PlacementCommandComponent

AUTO-GENERATED (GDScript) API entry

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: components/placement/placement_command_component.gd

Version: 6.0

class_name: PlacementCommandComponent extends: Component

Signals

(none)

Exports

  • action: CommandAction = CommandAction.PLACE
  • status: CommandStatus = CommandStatus.PENDING
    • The entity being affected
    • Target position for Place or Move actions
    • Target rotation for Place or Rotate actions
    • Snapshot data for Undo operations (e.g., previous position/rotation)
    • Result or failure message
    • Timestamp of when the command was created
  • target_entity_id: String = ""
    • Target position for Place or Move actions
    • Target rotation for Place or Rotate actions
    • Snapshot data for Undo operations (e.g., previous position/rotation)
    • Result or failure message
    • Timestamp of when the command was created
  • target_position: Vector2 = Vector2.ZERO
    • Target rotation for Place or Rotate actions
    • Snapshot data for Undo operations (e.g., previous position/rotation)
    • Result or failure message
    • Timestamp of when the command was created
  • target_rotation: float = 0.0
    • Snapshot data for Undo operations (e.g., previous position/rotation)
    • Result or failure message
    • Timestamp of when the command was created
  • undo_data: Dictionary = {}
    • Result or failure message
    • Timestamp of when the command was created
  • result_message: String = ""
    • Timestamp of when the command was created
  • timestamp: float = 0.0

Methods

  • _init(p_action: CommandAction = CommandAction.PLACE, p_target_position: Vector2 = Vector2.ZERO, p_target_entity_id: String = "")
  • complete(message: String = "") -> void
  • fail(message: String) -> void
  • mark_undone -> void
  • is_successful -> bool
  • is_active -> bool
  • get_action_description -> String
  • is_executed -> bool
  • execution_result -> String
  • transition_state(new_state: CommandState, message: String = "") -> void
    • Convert CommandState to CommandStatus
  • cancel -> void
  • get_message -> String
  • _to_string -> String
  • create_build_command(position: Vector2 = Vector2.ZERO, entity_id: String = "") -> PlacementCommandComponent
  • to_dict -> Dictionary
  • from_dict(data: Dictionary) -> PlacementCommandComponent