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

PlacementHistoryComponent

AUTO-GENERATED (GDScript) API entry

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: components/placement/placement_history_component.gd

Version: 6.0

class_name: PlacementHistoryComponent extends: Component

Signals

(none)

Exports

  • timestamp: float = 0.0
  • entity_id: String = ""
  • position: Vector2 = Vector2.ZERO
  • placeable_template: String = ""
  • success: bool = false
  • session_id: String = ""
  • metadata: Dictionary = {}
  • max_history_size: int = 1000
    • Current session identifier for grouping events
    • Whether history recording is currently active
    • Total number of entries recorded (including cleared ones)
    • Time when history was last cleared
  • current_session_id: String = ""
    • Whether history recording is currently active
    • Total number of entries recorded (including cleared ones)
    • Time when history was last cleared
    • Add a new entry to the history
    • [param entry]: The history entry to add
  • is_recording: bool = true
    • Total number of entries recorded (including cleared ones)
    • Time when history was last cleared
  • total_entries_recorded: int = 0
    • Time when history was last cleared
  • last_cleared_time: float = 0.0

Methods

  • _init(p_timestamp: float = 0.0, p_event_type: PlacementEventComponent, p_entity_id: String = "", p_position: Vector2 = Vector2.ZERO, p_placeable_template: String = "", p_success: bool = false, p_session_id: String = "", p_metadata: Dictionary = {}) -> void
  • _to_string -> String
  • from_dictionary(data: Dictionary) -> PlacementHistoryEntry
  • _init -> void
  • add_entry(entry: PlacementHistoryEntry) -> void
  • add_event_from_component(event_component: PlacementEventComponent) -> void
  • get_entries_by_session(session_id: String) -> Array
  • get_entries_by_time_range(start_time: float, end_time: float) -> Array
  • get_entries_by_position(position: Vector2, tolerance: float = 1.0) -> Array
  • get_entries_by_event_type(event_type: PlacementEventComponent) -> Array
  • get_recent_entries(count: int) -> Array
  • get_entries_by_entity(entity_id: String) -> Array
  • clear_history -> void
  • clear_old_entries(cutoff_time: float) -> void
  • get_statistics -> Dictionary
  • start_new_session(session_id: String = "") -> void
  • is_empty -> bool
  • get_oldest_entry_age -> float
  • get_newest_entry_age -> float