RuleResult
Summary
Section titled “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.
Properties
Section titled “Properties”rule: PlacementRule
The rule that was tested.
issues: Array[String]
Issues found during validation.
reason: String
Reason for rule placement validation success or failure.
Methods
Section titled “Methods”add_issue( p_issue: String ) -> void
Adds a single validation issue to the result. [param p_issue] A descriptive validation issue. Should not be empty.
add_issues( p_issues: Array[String] ) -> void
Adds multiple validation issues to the result. [param p_issues] Array of descriptive validation issues. Should not be null.
is_successful( ) -> bool
Returns whether the rule validation was successful. A rule is considered successful if no validation issues were found.
Source
Section titled “Source”addons/grid_building/placement/placement_rules/rule_result.gd
This page was auto-generated from GDScript source. Edit the source file to improve documentation.
Generated on 2025-09-07