IndicatorFactory
Summary
Section titled “Summary”IndicatorFactory - Creates, positions and manages lifecycle of rule-check indicators.
This class provides both static factory methods for creating indicators and instance methods for managing indicator lifecycle. It serves as the unified interface for all indicator operations in the grid building system.
ARCHITECTURE NOTE: IndicatorFactory instances are typically used within IndicatorManager, which serves as the scene tree parent for rule check indicators. Objects being manipulated should be parented to ManipulationParent instead.
For detailed usage guide and examples, see: docs_website/docs/systems/indicator_manager_guide.md
Static Factory Methods
Section titled “Static Factory Methods”generate_indicators()
- Creates multiple indicators from position-rules mappingcreate_indicator()
- Creates a single indicator at specified position
Instance Methods
Section titled “Instance Methods”setup_indicators()
- Full indicator setup with collision mapping and reportingreset()
- Comprehensive cleanup with diagnostic capabilitiesget_runtime_issues()
- Validation of dependencies and state
Responsibilities:
- Create and position RuleCheckIndicator instances for placement validation
- Integrate with CollisionMapper to map collision positions to rules
- Produce IndicatorSetupReport with diagnostic metadata for tests and logging
- Provide dependency-injection friendly constructors and validation helpers
- Manage indicator lifecycle with enhanced cleanup and reset functionality
- Offer diagnostic capabilities for debugging indicator state and orphaned indicators
Key Features:
- Comprehensive reset() function with critical cleanup logging and orphaned indicator detection
- Diagnostic information reporting for debugging indicator cleanup issues
- Guarded indicator setup with detailed error reporting
- Collision mapper integration with test setup management
- Grid alignment utilities for stable geometry calculations
Source
Section titled “Source”addons/grid_building/placement/manager/components/indicator_factory.gd
This page was auto-generated from GDScript source. Edit the source file to improve documentation.
Generated on 2025-09-07