Results from placement rule validation. RuleResult encapsulates the outcome of evaluating a placement rule, storing validation issues, success state, and contextual information for debugging and logging. The class supports both incremental construction (for building issues during validation) and complete construction (for finished results). Success is determined by the absence of validation issues, making the result self-documenting and suitable for build logs and user feedback systems.
Source: addons/grid_placement/placement/placement_rules/rule_result.gd
Syntax
class RuleResult extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
rule | Property | The rule that was tested. |
rule_id | Property | Stable id of the rule that produced this result (PlacementRule.get_rule_id()). Empty only when the result was built without a rule. |
issues | Property | Issues found during validation. |
success_message | Property | Optional message describing a pass, such as "Clear to build". The action log shows it when ActionLogSettings.print_success_reasons is on. Ignored when the result has issues. |
build | Method | |
add_issue | Method | |
add_issues | Method | |
is_successful | Method | |
is_empty | Method | |
get_issues | Method |