2
0
Fork 0

Update to 82b436285973127fa8cf33f9b88271dd56d937ed

This commit is contained in:
JeremyStar™ 2024-04-12 17:03:57 +02:00
parent 0bd0121e9f
commit 46be9c8491
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 6 additions and 4 deletions

View file

@ -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.
func cleanup() -> void:
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()
modules_reverse.reverse()
for module in modules_reverse:
await get(module)._cleanup()
get(module).loggeri.queue_free()
get(module).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()
config.queue_free()
queue_free()
## Returns if the framework is in development mode.

View file

@ -41,6 +41,8 @@ var config_newlines_override: bool
var config_newlines_sizelimit: int
# +++ module +++
func _cleanup() -> void: _schedule()
func _schedule() -> void:
for instance in instances:
if !is_instance_valid(instance): continue