Update some method and variable descriptions

This commit is contained in:
JeremyStar™ 2024-05-04 12:33:56 +02:00
parent 13b682d24c
commit 35868ca52d
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 7 additions and 7 deletions

View file

@ -29,5 +29,5 @@ enum LoggerLevel { NONE, SPECIAL, ERROR, WARN, INFO, VERB, DIAG }
enum SceneType { NONE, DEBUG, CUTSCENE, MENU, MAIN, BACKGROUND }
## To what degree [i]something[/i] should be blocked.
enum BlockadeLevel { IGNORE, WARN, BLOCK }
## All rule types data can be checked against.
## All validation rules some data can be checked against.
enum ValidationType { MATCHES_TYPE, MATCHES_CLASS, IN_RANGE, HAS_MINIMUM, HAS_MAXIMUM, HAS_VALUES, CONTAINS, MATCHES_REGEX, IS_NOT_EMPTY, IS_NOT_NULL, IS_NORMALIZED, IS_ORTHONORMALIZED }

View file

@ -33,7 +33,7 @@ var data # This is the only instance where we don't want to define what type th
## All rules to evaluate in [method evaluate].[br]
## [b]Note: [i]Don't modify.[/i][/b]
var rules: Array[Dictionary]
## The amount of failures.[br]
## Contains error messages for failed rules.[br]
## [b]Note: [i]Don't modify.[/i][/b]
var failures: Array[String] = []
@ -245,25 +245,25 @@ func in_range_float(from: float, to: float) -> CoreValidationSingle:
## Ensures that [param data] is equal to or exceeds the specified integer.[br]
## Applies to [int].
func has_minimum_value_int(minimum: int) -> CoreValidationSingle:
func has_minimum_int(minimum: int) -> CoreValidationSingle:
rules.append({ "type": CoreTypes.ValidationType.HAS_MINIMUM, "matched_against": "integer", "minimum": minimum })
return self
## Ensures that [param data] is under the specified integer.[br]
## Applies to [int].
func has_maximum_value_int(maximum: int) -> CoreValidationSingle:
func has_maximum_int(maximum: int) -> CoreValidationSingle:
rules.append({ "type": CoreTypes.ValidationType.HAS_MAXIMUM, "matched_against": "integer", "maximum": maximum })
return self
## Ensures that [param data] is equal to or exceeds the specified float.[br]
## Applies to [float].
func has_minimum_value_float(minimum: float) -> CoreValidationSingle:
func has_minimum_float(minimum: float) -> CoreValidationSingle:
rules.append({ "type": CoreTypes.ValidationType.HAS_MINIMUM, "matched_against": "float", "minimum": minimum })
return self
## Ensures that [param data] is under the specified float.[br]
## Applies to [float].
func has_maximum_value_float(maximum: float) -> CoreValidationSingle:
func has_maximum_float(maximum: float) -> CoreValidationSingle:
rules.append({ "type": CoreTypes.ValidationType.HAS_MAXIMUM, "matched_against": "float", "maximum": maximum })
return self
@ -274,7 +274,7 @@ func has_values(values: Array) -> CoreValidationSingle:
rules.append({ "type": CoreTypes.ValidationType.HAS_VALUES, "values": values })
return self
## Ensures that [param data] contains at least [code]<minimum_matches>[/code] values.[br]
## Ensures that [param data] contains at least <[code]minimum_matches[/code]> values.[br]
## Applies to [String] & [StringName].
func contains(values: Array[String], minimum_matches: int = 1) -> CoreValidationSingle:
rules.append({ "type": CoreTypes.ValidationType.HAS_VALUES, "values": values, "minimum_matches": minimum_matches })