IndicatorSetupReport

Calculates the number of tiles...

sort Weight: 10

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

Version: v5.0.0

STABLE

Inherits: RefCounted
Source: indicator_setup_report.gd
Parsing: AST-based for maximum accuracy with symbol typing


Variables

indicators:

The indicators created during setup


targeting_state: GridTargetingState

The targeting state being used for indicators to be created and tested against for placement and validation

Type: GridTargetingState


template: PackedScene

The template being used for instantiating indicators

Type: PackedScene


rules:

The rules that were being evaluated in the creation of the indicators


tile_positions:

All distinct tile positions that were used for the creation of indicators


position_rules_map:

The mapping between tile positions and an array of TileCheckRules that were assigned for an indicator at those positions


owner_shapes: Dictionary[Node2D,

List of owners and their attached collision shapes and polygons

Type: Dictionary[Node2D,


indicator_test_setups: Array[CollisionTestSetup2D]

Collision test setups for each collision shape / polygon 2D to be tested.

Type: Array[CollisionTestSetup2D]

Default: []


issues: Array[String]

The issues that occured during setup, if any

Type: Array[String]

Default: []


notes: Array[String]

These notes do not represent issues with the setup but may aid in debugging.

Type: Array[String]

Default: []


Methods

_init

Signature: _init(p_rules: Array[TileCheckRule]: Variant, p_targeting_state : GridTargetingState: Variant, p_template : PackedScene: Variant) -> void

Be sure to add issues and notes while handling the indicator instantiation process to keep the report updated.

Returns: void

Parameters:

  • p_rules: Array[TileCheckRule]: Variant
  • p_targeting_state : GridTargetingState: Variant
  • p_template : PackedScene: Variant

get_indicators_issues

Signature: get_indicators_issues() -> Array

indicators validation during runtime

Returns: Array


finalize

Signature: finalize() -> void

Populate derived fields (distinct tiles, type counts) after core fields set.

Returns: void


add_issue

Signature: add_issue(p_issue : String: Variant) -> void

Add an extra issue to the report

Returns: void

Parameters:

  • p_issue : String: Variant

has_issues

Signature: has_issues() -> bool

Whether the report currently has issues. Useful as a guard check.

Returns: bool


add_note

Signature: add_note(p_node : String: Variant) -> void

Adds a diagnostics note to the report

Returns: void

Parameters:

  • p_node : String: Variant

set_test_setups

Signature: set_test_setups(p_test_setups : Array[CollisionTestSetup2D]: Variant) -> void

For each indicator that was tested

Returns: void

Parameters:

  • p_test_setups : Array[CollisionTestSetup2D]: Variant

validate_setup_environment

Signature: validate_setup_environment(p_test_object : Node: Variant) -> bool

bool - True when the environment looks valid (no issues appended); false otherwise.

Returns: bool

Parameters:

  • p_test_object : Node: Variant

to_summary_string

Signature: to_summary_string() -> String

Generates a textual summary of the indicator setup report.

Returns: String


_ensure_positioner_grid_alignment

Signature: _ensure_positioner_grid_alignment() -> bool

Includes verbose logging when alignment adjustments are made.

Returns: bool


_compute_distinct_tiles

Signature: _compute_distinct_tiles() -> void

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

Returns: void