IndicatorManager
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Manages placement validation and indicator visualization for grid-based object placement.
Source File: /addons/grid_building/placement/manager/indicator_manager.gd
Extends: GBNode2D
Signals
- Signal:
indicators_changed(indicators: Array[RuleCheckIndicator])- Emitted when the active placement indicators are updated.
Properties
- Property:
initialized : bool = false- Whether the manager has been initalized yet or not
Private Properties
- Property:
_indicator_context: [IndicatorContext](./indicator-context/) = null(private) - Property:
_owner_context : [GBOwnerContext](./gb-owner-context/)(private) - Property:
_logger: [GBLogger](./gb-logger/) = null(private) - Property:
_indicator_template: PackedScene = null(private) - Property:
_targeting_state: [GridTargetingState](./grid-targeting-state/) = null(private) - Property:
_manipulation_state: [ManipulationState](./manipulation-state/) = null(private) - Property:
_indicator_service: [IndicatorService](./indicator-service/)(private) - Property:
_placement_validator: [PlacementValidator](./placement-validator/) = null(private) - Property:
_test_setup_factory: [TestSetupFactory](./test-setup-factory/) = null(private) - Property:
_last_setup_test_object: Node = null(private)
Constants
- Constant:
DEFAULT_NAME = "IndicatorManager"
Public Methods
create_with_injection
| |
Flags: static
Creates an IndicatorManager with dependencies injected from the provided container.
container The dependency injection container.
parent Optional parent node to attach the IndicatorManager to.
[returns] A configured IndicatorManager instance.
get_runtime_issues
| |
Validates required dependencies and returns any issues found. [returns] An array of issue strings (empty if valid).
resolve_gb_dependencies
| |
Resolves and injects dependencies from the composition container.
p_container The dependency injection container.
setup_indicators
| |
Sets up placement indicators for a test object using specified tile check rules.
p_test_object The object to test for placement.
p_tile_check_rules The tile check rules to apply.
[returns] An IndicatorSetupReport with indicators and diagnostic information.
get_indicator_count
| |
Calculates the number of indicators that would be created for a test object without actually creating them.
This is useful for performance-critical scenarios or UI calculations where you only need the count.
p_test_object The object to test for placement.
p_tile_check_rules The tile check rules to apply.
[returns] The number of indicators that would be created, or -1 if calculation fails.
get_indicators
| |
Returns the current active placement indicators. [returns] An array of RuleCheckIndicator instances.
get_colliding_indicators
| |
Returns indicators currently in collision. [returns] An array of colliding RuleCheckIndicator instances.
get_colliding_nodes
| |
Returns nodes colliding with any indicators. [returns] An array of Node2D instances in collision.
try_setup
| |
Attempts to set up a placement action and returns a setup report.
p_placeable_rules The placement rules to apply.
p_gts The grid targeting state.
p_ignore_base Whether to ignore base rules.
[returns] A PlacementReport with setup results.
clear
| |
tear_down
| |
Resets the manager, clearing indicators and validation state.
apply_rules
| |
Applies placement rules through the validator.
validate_placement
| |
Validates placement using indicators and rules. [returns] A ValidationResults object with validation outcome.
inject_collision_mapper_dependencies
| |
Updates the collision mapper with dependency injection if a composition container is available.
container The dependency injection container.
[returns bool] Whether the injection was successful or not
get_or_create_testing_indicator
| |
Returns the shared testing indicator, creating it if it doesn’t exist.
parent_node The parent node for the testing indicator.
[returns] The testing indicator instance.
setup_collision_mapper
| |
Sets up the collision mapper with the testing indicator and test setups.
testing_indicator The testing indicator to use.
setups The collision test setups.
get_collision_mapper
| |
Gets the collision mapper from the indicator service. [returns] The collision mapper instance.
get_placement_validator
| |
Exposes the underlying PlacementValidator for advanced/test usages. Tests use this to drive validation directly when needed.
force_shapecast_update
| |
Forces all managed indicators to update their shapecast collision detection immediately.
This is useful for tests to avoid waiting for physics frames when you only need
collision detection updated but don’t care about validity state yet.
For tests that need both collision detection AND validity evaluation, use
force_indicators_validity_evaluation instead.
force_indicators_validity_evaluation
| |
Forces all managed indicators to immediately update collision detection and
re-evaluate their validity state based on assigned rules.
This is the preferred method for tests as it provides deterministic validation
results without needing to wait for physics frames or process cycles.
Calls RuleCheckIndicator.force_validity_evaluation on each managed indicator.
[returns] The number of indicators that were updated.
Private Methods
_init
| |
Flags: private
_log_target_diagnostics
| |
Flags: private
_log_placement_start_diagnostics
| |
Flags: private
Logs detailed preview and rule configuration for debugging mask/layer mismatches. This is called once per placement start when debug logging is enabled.
_log_indicator_report
| |
Flags: private
_build_failed_report
| |
Flags: private
_on_manipulation_canceled
| |
Flags: private
Handles manipulation cancellation by cleaning up all active indicators.
This ensures indicators are properly freed when manipulation ends unexpectedly
(e.g., source object deleted, user cancels, etc.).
_data The manipulation data (unused, but required by signal signature).
Grid Building v5.0.8 | Generated 24/05/2026