Update script documentation

This commit is contained in:
JeremyStar™ 2024-05-05 15:01:01 +02:00
parent 3ee429c63b
commit 307a4c7533
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 7 additions and 5 deletions

View file

@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
## Validates some data against a set of rules.
## Validates some [param data] against a set of predefined rules.
extends Node
class_name CoreValidationSingle

View file

@ -59,10 +59,12 @@ func _schedule() -> void:
schema.queue_free()
# +++ data validation +++
func get_schema(schema: Dictionary, parent: Node) -> CoreValidationSchema:
schemas.append(parent)
return CoreValidationSchema.new(core, schema, parent)
## Returns a new [CoreValidationSingle]
func get_single(data, parent: Node) -> CoreValidationSingle:
singles.append(parent)
return CoreValidationSingle.new(core, data, parent)
## Returns a new [CoreValidationSchema]
func get_schema(schema: Dictionary, parent: Node) -> CoreValidationSchema:
schemas.append(parent)
return CoreValidationSchema.new(core, schema, parent)