2
0
Fork 0

Update to 5582fef70a5a8220313cfc414b8cf4ee0f48bc87

This commit is contained in:
JeremyStar™ 2024-05-18 19:28:43 +02:00
parent 59ac90c40b
commit d743da3b8d
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -28,7 +28,7 @@ const version_version: int = 2
## The version type. See [enum CoreTypes.VersionType] for more information. ## The version type. See [enum CoreTypes.VersionType] for more information.
const version_type: CoreTypes.VersionType = CoreTypes.VersionType.RELEASE const version_type: CoreTypes.VersionType = CoreTypes.VersionType.RELEASE
## The version type number. Resets on every new version and version type. ## The version type number. Resets on every new version and version type.
const version_typerelease: int = 0 const version_typerelease: int = 1
## The fork indicator. Update this if you intend on soft or hard forking this framework. ## The fork indicator. Update this if you intend on soft or hard forking this framework.
const version_fork: String = "" const version_fork: String = ""
@ -245,19 +245,26 @@ func register_custom_module(module_name: String, module_origin: String, module_c
if custom_modules.has(module_name): if custom_modules.has(module_name):
loggeri.error(stringify_variables("Registering module failed: A custom module with the name %name% already exists.", { "name": module_name })) loggeri.error(stringify_variables("Registering module failed: A custom module with the name %name% already exists.", { "name": module_name }))
return false return false
loggeri.diag("Updating variables")
# Update variables
module_class.name = module_name module_class.name = module_name
module_class.core = self module_class.core = self
module_class.logger = logger.get_instance(module_origin, module_class) module_class.logger = logger.get_instance(module_origin, module_class)
module_class.logger.framework = true module_class.logger.framework = true
loggeri.diag("Adding module to SceneTree")
custom_modules_node.add_child(module_class) # Register module
loggeri.diag("Merging module with custom_modules")
custom_modules.merge({ module_name: module_class }) custom_modules.merge({ module_name: module_class })
loggeri.diag("Initializing custom module")
module_class._initialize() # Add to 'custom_modules_node'
loggeri.diag("Updating custom module configuration") custom_modules_node.add_child(module_class)
module_class._pull_config()
# Initialize module
@warning_ignore("redundant_await")
await module_class._initialize()
# Update module configuration
@warning_ignore("redundant_await")
await module_class._pull_config()
return true return true
## Unregisters a custom module, making it no longer available. ## Unregisters a custom module, making it no longer available.