Fix issues
This commit is contained in:
parent
4a291d7935
commit
7d8c5f295a
2 changed files with 6 additions and 3 deletions
|
@ -38,9 +38,10 @@ var rules: Array[Dictionary]
|
|||
var failures: Array[String] = []
|
||||
|
||||
# +++ constructor +++
|
||||
func _init(core_new: Core, data_new) -> void:
|
||||
func _init(core_new: Core, data_new, parent_new: Node) -> void:
|
||||
core = core_new
|
||||
logger = core.logger.get_instance(core.basepath.replace("res://", "") + "src/classes/validationsingle.gd", self)
|
||||
parent = parent_new
|
||||
data = data_new
|
||||
|
||||
# +++ evaluation +++
|
||||
|
|
|
@ -23,6 +23,7 @@ var singles: Array[CoreValidationSingle]
|
|||
|
||||
# +++ module +++
|
||||
func _cleanup() -> void:
|
||||
# Singles
|
||||
var singles_remove_enty: Array[CoreLoggerInstance] = []
|
||||
for single in singles:
|
||||
singles_remove_enty.append(single)
|
||||
|
@ -33,6 +34,7 @@ func _cleanup() -> void:
|
|||
for single in singles_remove_enty:
|
||||
singles.remove_at(singles.find(single))
|
||||
func _schedule() -> void:
|
||||
# Singles
|
||||
for single in singles:
|
||||
if is_instance_valid(single):
|
||||
logger.diag("Removing single '" + single.name + "'")
|
||||
|
@ -42,6 +44,6 @@ func _schedule() -> void:
|
|||
#func get_schema(Dictionary schema) -> CoreValidationSchema:
|
||||
# return CoreValidationSchema.new(core, schema)
|
||||
|
||||
func get_single(data, parent) -> CoreValidationSingle:
|
||||
func get_single(data, parent: Node) -> CoreValidationSingle:
|
||||
singles.append(parent)
|
||||
return CoreValidationSingle.new(core, data)
|
||||
return CoreValidationSingle.new(core, data, parent)
|
||||
|
|
Loading…
Reference in a new issue