Class IndicatorSetupReport
- Namespace
- GridPlacement.GDScript
- Assembly
- MoonBark.GridPlacement.GDScript.dll
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.
class IndicatorSetupReport extends RefCounted
Properties
indicators
The indicators created during setup
var indicators: Array[RuleCheckIndicator] = []
targeting_state
The targeting state being used for indicators to be created and tested against for placement and validation
var targeting_state: GridTargetingState
template
The template being used for instantiating indicators
var template: PackedScene
rules
The rules that were being evaluated in the creation of the indicators
var rules: Array[TileCheckRule] = []
tile_positions
All distinct tile positions that were used for the creation of indicators
var tile_positions: Array[Vector2i] = []
position_rules_map
The mapping between tile positions and an array of TileCheckRules that were assigned for an indicator at those positions
var position_rules_map: Dictionary[Vector2i, Array] = {}
owner_shapes
List of owners and their attached collision shapes and polygons
var owner_shapes: Dictionary[Node2D, Array] = {}
indicator_test_setups
Collision test setups for each collision shape / polygon 2D to be tested.
var indicator_test_setups: Array[CollisionTestSetup2D] = []
issues
var issues: Array[String] = []
notes
Verbose diagnostic notes to detail what happened during indicator setup. These notes do not represent issues with the setup but may aid in debugging.
var notes: Array[String] = []
issues
var issues: Array[String] = []
indicator
var indicator = indicators[i]
runtime_issues
var runtime_issues: Array[String] = []
summary
var summary: String = ""
map
var map = targeting_state.target_map
positioner
var positioner = targeting_state.positioner
current_world_pos
var current_world_pos = positioner.global_position
tile_pos
var tile_pos = map.local_to_map(map.to_local(indicator.global_position))
aligned_world_pos
var aligned_world_pos = map.to_global(map.map_to_local(tile_pos))
position_diff
var position_diff = (aligned_world_pos - current_world_pos).length()
map
var map = targeting_state.target_map
tiles
var tiles: Array[Vector2i] = []
indicator
var indicator = indicators[i]
tile_pos
var tile_pos = map.local_to_map(map.to_local(indicator.global_position))
Methods
get_indicators_issues
func get_indicators_issues() -> Array[String]:
Returns
finalize
func finalize() -> void:
Returns
add_issue
func add_issue(p_issue : String) -> void:
Parameters
p_issue
Returns
has_issues
func has_issues() -> bool:
Returns
is_successful
func is_successful() -> bool:
Returns
add_note
func add_note(p_node : String) -> void:
Parameters
p_node
Returns
set_test_setups
func set_test_setups(p_test_setups : Array[CollisionTestSetup2D]) -> void:
Parameters
p_test_setups
Returns
validate_setup_environment
func validate_setup_environment(p_test_object : Node) -> bool:
Parameters
p_test_object
Returns
to_summary_string
func to_summary_string() -> String: