ValidationResults
Generates a concise summary string of the validation results.
Generates a concise summary string of the validation results.
Version: v5.0.0
Inherits: RefCounted
Source: validation_results.gd
Parsing: AST-based for maximum accuracy with symbol typing
Variables
message: String
Success or failure message.
Type: String
rule_results: Dictionary[PlacementRule,
Individual rule results
Type: Dictionary[PlacementRule,
_errors: Array[String]
Fix these issues for your game
Type: Array[String]
Default: []
Methods
_init
Signature: _init(p_is_successful : bool = false: Variant, p_message : String = "": Variant, p_rule_results : Dictionary[PlacementRule: Variant, RuleResult] = {}: Variant) -> void
p_rule_results: Dictionary[PlacementRule, Array] - Individual rule results including an array of issues for each rule prevent successful placement validation
Returns: void
Parameters:
p_is_successful : bool = false: Variantp_message : String = "": Variantp_rule_results : Dictionary[PlacementRule: VariantRuleResult] = {}: Variant
add_rule_result
Signature: add_rule_result(p_placement_rule : PlacementRule: Variant, p_result : RuleResult: Variant) -> void
Adds a rule result for a specific placement rule.
Returns: void
Parameters:
p_placement_rule : PlacementRule: Variantp_result : RuleResult: Variant
get_issues
Signature: get_issues() -> Array
Returns: Array
add_error
Signature: add_error(p_error : String: Variant) -> void
This should be reported to the developer appropriately
Returns: void
Parameters:
p_error : String: Variant
is_successful
Signature: is_successful() -> bool
Checks that there were no validation issues with the placement of the object
Returns: bool
has_failing_rules
Signature: has_failing_rules() -> bool
Whether the validation had any failing placement rules
Returns: bool
has_errors
Signature: has_errors() -> bool
These should be reported to the developer
Returns: bool
get_successful_rules
Signature: get_successful_rules() -> Array
Gets the successful rules
Returns: Array
get_failing_rules
Signature: get_failing_rules() -> Array
Gets the failing rules
Returns: Array
get_errors
Signature: get_errors() -> Array
Gets the configuration/setup errors in a duplicated array
Returns: Array
get_failing_rule_results
Signature: get_failing_rule_results() -> Dictionary
Gets the failing rules and their issues Array[String]
Returns: Dictionary
get_summary_string
Signature: get_summary_string() -> String
Generates a concise summary string of the validation results.
Returns: String