Chris' Tutorials
Docs/Grid Placement

Class

IndicatorService2D

Generated GDScript class reference for GridPlacement.IndicatorService2D.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

IndicatorService2D

  • Service component for managing rule-check indicators within IndicatorManager. This class is a service component that IndicatorManager uses to handle the creation, placement, and lifecycle management of RuleCheckIndicator2D instances. It encapsulates the complex logic for indicator setup, collision mapping, and diagnostic reporting while providing a clean interface for IndicatorManager to delegate indicator-related operations. ## Architecture Role IndicatorService2D acts as a specialized component within the IndicatorManager architecture: - IndicatorManager: Main coordinator that owns and orchestrates indicator operations - IndicatorService2D: Service component that handles the detailed implementation - IndicatorFactory2D: Pure logic class for indicator creation and validation ## Key Responsibilities
  • Execute indicator setup workflows with collision mapping and validation
  • Manage indicator lifecycle including creation, positioning, and cleanup
  • Provide diagnostic capabilities and comprehensive error reporting
  • Handle collision detection integration with CollisionMapper
  • Generate detailed setup reports for testing and debugging ## Usage Pattern var service = IndicatorService2D.create_with_injection(container, parent_node) var report = service.setup_indicators(test_object, rules, parent_node) var indicators = service.get_indicators() service.reset() For detailed usage guide and examples, see: docs_website/docs/systems/indicator_manager_guide.md Responsibilities:
  • Execute indicator setup workflows with collision mapping and validation
  • Manage indicator lifecycle including creation, positioning, and cleanup
  • Provide diagnostic capabilities and comprehensive error reporting
  • Handle collision detection integration with CollisionMapper
  • Generate detailed setup reports for testing and debugging
  • Maintain indicator state and provide access to managed indicators
  • Support comprehensive reset functionality with orphaned indicator detection Key Features:
  • Comprehensive reset() function with critical cleanup logging and orphaned indicator detection
  • Guarded indicator setup with detailed error reporting and diagnostic metadata
  • Collision mapper integration with test setup management and validation
  • Grid alignment utilities for stable geometry calculations
  • Diagnostic information reporting for debugging indicator state and issues
  • Dependency injection support with comprehensive validation
  • Signal emission for indicator state changes to support reactive programming

Source: addons/grid_placement/placement/manager/components/indicator_service_2d.gd

Syntax

class IndicatorService2D extends PlacementInjectable

Members

NameKindSummary
indicators_changedEventEmitted when the active RuleCheckIndicators change. Usually in response to a placement or move action that needs rule evaluation for TileCheckRules. Also emitted during reset operations when indicators are cleared.
pProperty
create_with_injectionMethod
targeting_stateProperty
loggerProperty
templateProperty
managerProperty
issuesProperty
resolve_placement_dependenciesMethod
collision_mapper_injectedProperty
force_updateMethod
get_runtime_issuesMethod
issuesProperty
resetMethod
pProperty
cleanup_parentsProperty
childrenProperty
pProperty
is_service_readyMethod
get_indicatorsMethod
get_diagnostic_infoMethod
infoProperty
get_collision_mapperMethod
set_indicatorsMethod
setup_indicatorsMethod
reportProperty
testing_indicatorProperty
setup_resultProperty
testing_parentProperty
test_setupsProperty
reconciledProperty
calculate_indicator_countMethod
build_collision_test_setupsMethod
build_collision_test_setups_with_targeting_stateMethod
gather_collision_shapesMethod
validate_indicator_positionsMethod
validate_setup_preconditionsMethod
get_or_create_testing_indicatorMethod
get_colliding_indicatorsMethod
colliding_indicatorsProperty
use_cacheProperty
is_colProperty
get_colliding_nodesMethod
colliding_nodesProperty
use_cacheProperty
is_colProperty
collidersProperty
countProperty
colliderProperty
add_indicatorsMethod
free_indicatorsMethod
indicators_to_freeProperty
parentProperty
clear_indicatorsMethod
min_xProperty
max_xProperty
min_yProperty
max_yProperty
mapProperty
indicator_tileProperty
is_leftProperty
is_rightProperty
is_topProperty
is_bottomProperty
map_layerProperty
final_indicatorsProperty
existing_by_posProperty
posProperty
reused_existingProperty
new_posProperty
usedProperty
pProperty
leftoverProperty
p2Property

Source

addons/grid_placement/placement/manager/components/indicator_service_2d.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs