AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: systems/grid_targeting/grid_positioner/grid_positioner_2d.gd
Version: 5.0
class_name: GridPositioner2D
extends: Node2D
Signals
(none)
Exports
(none)
Methods
_init -> void_ready -> void- Start invisible until proper dependencies are injected
_physics_process(delta: float) -> void- Positioner no longer depends on shapecast; physics tick retained only for optional diagnostics.
_process(delta: float) -> void- Optional debug: detect external visibility changes vs expected computation
set_input_processing_enabled(p_enabled: bool) -> voidis_input_processing_enabled -> boolis_input_ready -> boolare_dependencies_ready -> boolresolve_gb_dependencies(p_config: GBCompositionContainer) -> void- Forward to explicit dependency injection helper to avoid service locator usage.
_input(event: InputEvent)- Guard: Return early if critical dependencies are not yet injected
_handle_mouse_motion_event(motion: InputEventMouseMotion, current_mode: GBEnums) -> void- Apply mouse input gate (always check, regardless of mode)
_convert_screen_to_world(screen_pos: Vector2) -> Vector2- Get viewport using fail-fast approach
_move_to_cached_mouse_world -> Vector2i_cache_current_world_position -> void_get_active_viewport -> Viewport_get_active_camera(p_vp: Viewport) -> Camera2D_is_disabled_in_off_mode -> bool_is_mouse_cursor_on_screen -> bool_is_mouse_follow_allowed -> bool_mouse_input_gate -> bool_apply_mouse_world(world: Vector2, method: int, screen: Vector2) -> void- Cache
_log_mouse_motion(p_method: int, p_screen: Vector2, p_world: Vector2) -> void_log_mouse_gate(p_allowed: bool) -> void- Only log when state changes to reduce spam
_apply_recenter_on_enable -> void_apply_positioning_and_visibility_sequence -> void- First apply positioning (requires Camera2D to be ready)
_recenter_decision_to_string(p_decision: int) -> String_handle_mouse_movement(mouse_global_override: Variant = null) -> void- Diagnostics: log guard state for mouse movement handling
_move_positioner_by_tile(p_tile_delta: Vector2i) -> voidmove_to_viewport_center_tile -> Vector2imove_to_cursor_center_tile -> Vector2i_apply_recenter -> voidget_last_manual_recenter_mode -> int_exit_tree -> voidremove_self_as_positionerupdate_visibility -> void- Recalculate desired visibility based on current mode and settings
should_be_visible -> bool- If mode/state not ready, keep current visibility to avoid flicker
set_dependencies(p_states: GBStates, p_config: GBConfig, p_logger: GBLogger = null, p_actions: GBActions = null, enable_input: bool = true) -> voidget_runtime_issues -> Array- Validate required injected states
validate_dependencies -> bool_on_mode_changed(p_mode: GBEnums)- Apply positioning when entering build mode (to ensure positioner is visible on screen)
_should_be_visible_for_mode(p_mode: GBEnums) -> boolget_visual_node -> Nodeis_visual_visible -> bool_set_visible_state(p_visible: bool) -> voidlog_current_visual_state_schedule_end_of_frame_state_log -> void_log_end_of_frame_state_async -> void_log_screen_and_mouse_state_visibility_context(visual: CanvasItem) -> Stringis_positioner_active -> boolshould_hide_under_handled_ui -> boolare_dependencies_resolved -> boolto_diagnostic_string -> String- Defensive: provide diagnostic info even if dependencies aren’t fully resolved
_set_visibility_reason(p_reason: String) -> void_visibility_decision_trace -> String- Pass a Dictionary snapshot (public API) to the logic helper to satisfy its typed signature
_get_debug_log_mode -> GBDebugSettings_is_logging_mode(p_mode: GBDebugSettings) -> bool_is_visibility_logging_enabled -> bool_is_mouse_input_logging_enabled -> bool_is_positioning_logging_enabled -> bool_is_state_flow_logging_enabled -> bool_log_debug(p_mode: GBDebugSettings, p_message: String, p_throttled: bool = true) -> void_log_visibility(p_message: String, p_throttled: bool = true) -> void_log_mouse(p_message: String, p_throttled: bool = true) -> void_log_positioning(p_message: String, p_throttled: bool = true) -> void_log_state_flow(p_message: String, p_throttled: bool = true) -> void_test_convert_screen_to_world(screen_pos: Vector2) -> Vector2_test_get_tile_center_from_screen(screen_pos: Vector2) -> Dictionary_apply_visibility_result(p_result: MouseEventVisibilityResult) -> void