diff --git a/src/core.gd b/src/core.gd index 37c6a6c..4a4a72e 100644 --- a/src/core.gd +++ b/src/core.gd @@ -59,12 +59,18 @@ var storage: CoreBaseModule var basepath: String # Contains a list of all registered cleanup hooks. var cleanup_hooks: Dictionary = {} +## Internal, don't modify. # Contains a list of all loaded custom modules. var custom_modules: Dictionary = {} +## Internal, don't modify. # Contains the node holding all custom modules as children. var custom_modules_node: Node +## Internal, don't modify. # The CORE Object's logger instance. var loggeri: CoreLoggerInstance +## Internal, don't modify. +# Makes CORE inaccessible if true. +var disabled: bool = false # +++ initialization +++ func _init(new_config: CoreConfiguration = CoreConfiguration.new()) -> void: @@ -86,6 +92,7 @@ func _ready() -> void: get_tree().auto_accept_quit = false # Initializes all built-in modules during the preinitialization phase. +## Internal, don't call. func initialize_modules() -> void: for module in modules: set(module, CoreBaseModule.new()) @@ -96,9 +103,11 @@ func initialize_modules() -> void: get(module)._initialize() # Injects CORE's builtin modules into the SceneTree. +## Internal, don't call. func inject_modules() -> void: for module in modules: add_child(get(module)) # Initializes the framework scheduler. +## Internal, don't call. func initialize_scheduler() -> void: scheduler = Timer.new() scheduler.name = "Scheduler" @@ -157,6 +166,7 @@ func reload_configuration(new_config: CoreConfiguration = CoreConfiguration.new( if initialized: apply_configuration() # Applies a new configuration. +## Internal, don't call. func apply_configuration() -> void: if loggeri != null: loggeri.verb("Applying configuration") if is_devmode() and loggeri != null: loggeri.warn("The CORE Framework is in development mode. Here be dragons!") @@ -249,6 +259,7 @@ func cleanup() -> void: queue_free() # Generates a new cleanup hook id +## Internal, don't call. func _generate_hook_id() -> int: var id = randi() if cleanup_hooks.has(id): @@ -391,6 +402,7 @@ func quit_safely(exitcode: int = 0) -> void: get_tree().quit(exitcode) # Just ignore this. +## Internal, don't call. func _notification(what) -> void: match(what): NOTIFICATION_WM_CLOSE_REQUEST: