AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: systems/interaction/drag_system.gd
Version: 6.0
class_name: DragSystem
extends: System
Signals
PlacementSignalBus
Exports
default_placement_cooldown: float = 0.1- Performance settings
- Private state
max_placement_rate: float = 10.0- Performance settings
- Private state
enable_placement_validation: bool = true- Performance settings
- Private state
max_active_drags: int = 5- Private state
cleanup_inactive_after: float = 5.0- Private state
Methods
query -> QueryBuilderprocess(entities: Array, components: Array, delta: float) -> void- Event-driven system - minimal per-frame processing
setup -> void- Connect to target change signals
cleanup -> void- Disconnect from target change signals
_process_drag_component(entity: Entity, drag: DragComponent, delta: float) -> void- Handle different drag states
_update_drag_timing(drag: DragComponent, delta: float) -> void_connect_target_change_signals -> void_disconnect_target_change_signals -> void_setup_cleanup_timer -> void_cleanup_timer -> void_on_cleanup_timer_timeout -> void_update_active_drag_cache(entities: Array, drag_components: Array) -> void_process_active_drags_only(entities: Array, drag_components: Array, delta: float) -> void- Only process cached active drag entities
_on_target_changed(event: TargetChangedEvent) -> void- Fallback for cases where cache has not been populated yet
_perform_event_driven_cleanup -> void- Use cached active drag entities for efficiency
start_drag(placeable_entity: Entity, source: String = "mouse", input_id: int = -1) -> DragComponent- Create drag entity
end_drag(drag_entity: Entity) -> voidget_active_drags -> Arrayupdate_drag_position(drag_entity: Entity, new_grid_position: Vector2i) -> voidget_drag_statistics(drag: DragComponent) -> Dictionary_init_drag_session(drag: DragComponent, entity: Entity, source: String, input_id: int) -> void_reset_drag(drag: DragComponent) -> void_update_drag_position(drag: DragComponent, new_grid_position: Vector2i) -> void_can_place_at_current_position(drag: DragComponent) -> bool- Check cooldown
_trigger_placement(drag: DragComponent) -> void_emit_placement_request(drag: DragComponent) -> void_emit_drag_start_event(entity: Entity, drag: DragComponent) -> void_emit_drag_update_event(entity: Entity, drag: DragComponent, target_event: TargetChangedEvent) -> void_emit_drag_end_event(entity: Entity, drag: DragComponent) -> voidget_all_drag_trails -> Arrayclear_all_drag_trails -> voidset_placement_cooldown(cooldown: float) -> voidset_max_placement_rate(rate: float) -> void