RuleResult
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Results from placement rule validation.
Source File: addons/grid_building/placement/placement_rules/rule_result.gd
Extends: RefCounted
Properties
- Property:
rule: [PlacementRule](./placement-rule/)- The rule that was tested. - Property:
issues: Array[String] = []- Issues found during validation.
Public Methods
build
Flags: static
Factory for creating a finished rule result.
Creates an immutable result with all validation data complete.
p_rule The rule that was tested
p_issues Issues found during validation
p_reason Reason for success or failure
add_issue
Adds a single validation issue to the result.
p_issue A descriptive validation issue. Should not be empty.
add_issues
Adds multiple validation issues to the result.
p_issues Array of descriptive validation issues. Should not be null.
is_successful
Returns whether the rule validation was successful. A rule is considered successful if no validation issues were found.
is_empty
Backward compatibility shim expected by legacy validation code which called is_empty on RuleResult
get_issues
Convenience accessor returning all issues (alias)
Private Methods
_init
Flags: private
Creates a basic rule result for incremental building during validation.
Use this when you need to build up issues gradually during rule evaluation.
p_rule The placement rule being tested. Cannot be null.