Update to 82b436285973127fa8cf33f9b88271dd56d937ed
This commit is contained in:
parent
0bd0121e9f
commit
46be9c8491
2 changed files with 6 additions and 4 deletions
|
@ -227,16 +227,16 @@ func get_custom_module(module_name: String) -> CoreBaseModule:
|
||||||
## Unloads all custom modules, built-in modules, frees any of CORE's classes and lastly itself.
|
## Unloads all custom modules, built-in modules, frees any of CORE's classes and lastly itself.
|
||||||
func cleanup() -> void:
|
func cleanup() -> void:
|
||||||
loggeri.info("Cleaning up")
|
loggeri.info("Cleaning up")
|
||||||
config.queue_free()
|
for module in custom_modules_node.get_children(): unregister_custom_module(module.name)
|
||||||
|
remove_child(custom_modules_node)
|
||||||
|
custom_modules_node.queue_free()
|
||||||
var modules_reverse: Array[String] = modules.duplicate()
|
var modules_reverse: Array[String] = modules.duplicate()
|
||||||
modules_reverse.reverse()
|
modules_reverse.reverse()
|
||||||
for module in modules_reverse:
|
for module in modules_reverse:
|
||||||
await get(module)._cleanup()
|
await get(module)._cleanup()
|
||||||
get(module).loggeri.queue_free()
|
get(module).loggeri.queue_free()
|
||||||
get(module).queue_free()
|
get(module).queue_free()
|
||||||
for module in custom_modules_node.get_children(): unregister_custom_module(module.name)
|
config.queue_free()
|
||||||
remove_child(custom_modules_node)
|
|
||||||
custom_modules_node.queue_free()
|
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
## Returns if the framework is in development mode.
|
## Returns if the framework is in development mode.
|
||||||
|
|
|
@ -41,6 +41,8 @@ var config_newlines_override: bool
|
||||||
var config_newlines_sizelimit: int
|
var config_newlines_sizelimit: int
|
||||||
|
|
||||||
# +++ module +++
|
# +++ module +++
|
||||||
|
func _cleanup() -> void: _schedule()
|
||||||
|
|
||||||
func _schedule() -> void:
|
func _schedule() -> void:
|
||||||
for instance in instances:
|
for instance in instances:
|
||||||
if !is_instance_valid(instance): continue
|
if !is_instance_valid(instance): continue
|
||||||
|
|
Loading…
Reference in a new issue