Grid Placement

RuleResult

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: systems/placement/validators/placement_rules/rule_result.gd

Version: 5.1

class_name: RuleResult extends: RefCounted

Summary

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.

Signals

(none)

Exports

(none)

Methods

  • _init()
    • Creates a basic rule result for incremental building during validation. Use this when you need to build up issues gradually during rule evaluation. [param p_rule] The placement rule being tested. Cannot be null.
  • add_issue()
    • Adds a single validation issue to the result. [param p_issue] A descriptive validation issue. Should not be empty.
  • add_issues()
    • Adds multiple validation issues to the result. [param 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)