AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: placement/rule_check_indicator/rule_check_indicator.gd
Version: 5.0
class_name: RuleCheckIndicator
extends: ShapeCast2D
Signals
valid_changed(is_valid: bool)
Exports
validity_sprite: Sprite2D = null- Whether to show the indicator visual sprites for players or not.
_group- Whether to show the indicator visual sprites for players or not.
show_indicatorsvalid_settings: IndicatorVisualSettings- Cache whether debug drawing should be active to avoid checking each frame
invalid_settings: IndicatorVisualSettings- Cache whether debug drawing should be active to avoid checking each frame
rules- Displays visual feedback for tile validity during building preview by running all assigned TileCheckRules and updating its visuals accordingly.
- Used by IndicatorManager and PlacementValidator as part of the validation pipeline. [br][br]
- Usage: It is recommended to set the TargetPosition to Vector2(0,0) so that the indicator’s position aligns with the tile being evaluated. [br][br]
- [b]IMPORTANT FOR ISOMETRIC GAMES:[/b] This ShapeCast2D should use [ConvexPolygonShape2D] with explicit
- diamond points, NOT [RectangleShape2D] with skew transformation. When the parent [ManipulationParent]
- rotates (e.g., 90° during manipulation), skewed rectangles create visual distortion due to compound
- transforms (skew + rotation). Polygon shapes rotate uniformly without perspective changes. [br][br]
- For detailed explanation and examples, see: [code]docs/v5-0-0/guides/isometric_implementation.mdx[/code][br][br]
- See [code]project-architecture.md[/code] for system architecture and building flow documentation.
valid- Usage: It is recommended to set the TargetPosition to Vector2(0,0) so that the indicator’s position aligns with the tile being evaluated. [br][br]
- [b]IMPORTANT FOR ISOMETRIC GAMES:[/b] This ShapeCast2D should use [ConvexPolygonShape2D] with explicit
- diamond points, NOT [RectangleShape2D] with skew transformation. When the parent [ManipulationParent]
- rotates (e.g., 90° during manipulation), skewed rectangles create visual distortion due to compound
- transforms (skew + rotation). Polygon shapes rotate uniformly without perspective changes. [br][br]
- For detailed explanation and examples, see: [code]docs/v5-0-0/guides/isometric_implementation.mdx[/code][br][br]
- See [code]project-architecture.md[/code] for system architecture and building flow documentation.
[Settings]
Methods
_init(p_rules: Array)- Set target_position to zero for proper tile alignment in tests
_ready_physics_process(_delta: float) -> voidresolve_gb_dependencies(p_container: GBCompositionContainer) -> voidget_rules -> Arrayadd_rule(p_rule: TileCheckRule)_on_tree_entered_validateget_tile_position(p_map: TileMapLayer) -> Vector2iclearvalidate_rules(p_rules: Array) -> Array- Build a failing_checker callable that captures this indicator but passes only the rule to the helper
_indicator_debug_enabled -> bool- Determine whether debug drawing should be enabled.
_indicator_log_enabled -> bool_update_visuals(p_display_settings: IndicatorVisualSettings) -> Sprite2D- Fail-fast for missing display settings only; if there’s no sprite, just skip visuals
_update_current_display_settings(p_display_rules: Array, p_is_valid = null)- Use passed validity state if provided, otherwise fall back to class property
_find_highest_rule_with_visual_settings(p_rules: Array) -> TileCheckRule- Find the highest priority failing rule with fail visual settings
_draw- Fast exit if debug draw is disabled
get_debug_info -> Dictionaryvalidate_runtime -> bool- Avoid hard assertion - tests may construct indicators without a logger.
trace_runtime_if_enabled -> void- Debug logging for setup (logger decides verbosity). Skip if logger missing.
get_runtime_issues -> Array- Start with editor-time issues so runtime includes all authoring checks
get_editor_issues -> Array- Visual assets/settings that should be assigned for proper authoring
_on_debug_settings_changed -> void_update_debug_cached_state -> voidupdate_validity_state -> boolforce_validity_evaluation -> bool_on_valid_changed(is_valid: bool)_debug_setting_float_or(default_value: float, getter_name: String) -> float_debug_setting_color_or(default_value: Color, getter_name: String) -> Color