Grid Placement

IndicatorSetupReport

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: systems/placement/managers/indicator_setup_report.gd

Version: 5.1

class_name: IndicatorSetupReport extends: RefCounted

Summary

Represents a structured report of an IndicatorManager.setup_indicators() run. Holds the produced indicators plus diagnostic metadata that can be logged or asserted in tests.

Signals

(none)

Exports

(none)

Methods

  • _init()
    • Defines basically validation dependencies for the indicator setup but does not solely build report. Be sure to add issues and notes while handling the indicator instantiation process to keep the report updated.
  • get_indicators_issues()
    • Lists issues that are preventing a proper indicators validation during runtime
  • finalize()
    • Populate derived fields (distinct tiles, type counts) after core fields set.
  • add_issue()
    • Add an extra issue to the report
  • has_issues()
    • Whether the report currently has issues. Useful as a guard check.
  • add_note()
    • Adds a diagnostics note to the report
  • set_test_setups()
    • Sets the collision object test setups for the report For each indicator that was tested
  • validate_setup_environment()
    • Perform preflight validation of indicator setup environment

Checks required dependencies and runtime state before indicator generation. If issues are found they are appended to the provided [code]IndicatorSetupReport[/code] so callers can decide whether to abort and surface a clear error report instead of throwing exceptions.

Parameters: [code]p_test_object[/code] : [i]Node[/i] - The preview/test object that will be used to derive collision shapes. [code]p_tile_check_rules[/code] : [i]Array[TileCheckRule][/i] - The set of tile rules that will be evaluated. [code]p_report[/code] : [i]IndicatorSetupReport[/i] - Mutable report where discovered issues will be pushed.

Returns: [i]bool[/i] - True when the environment looks valid (no issues appended); false otherwise.

  • to_summary_string()
    • Generates a textual summary of the indicator setup report.
  • to_verbose_string()
    • Generates a verbose detailed representation of the indicator setup report. [return] A formatted string containing complete diagnostic information.
  • _ensure_positioner_grid_alignment()
    • Ensures the positioner is properly aligned to the grid before collision calculations. This prevents asymmetric indicator generation due to fractional positioning. The positioner position is snapped to the nearest tile center for consistent geometry.

Note: Only updates position if it’s not already aligned within a small tolerance. Includes verbose logging when alignment adjustments are made.

  • _compute_distinct_tiles()
    • Calculates the number of tiles that have an indicator over them. There should only be one indicator per tile!
  • _get_targeting_state_snapshot()