Add "Internal, don't modify." descriptions

This commit is contained in:
JeremyStar™ 2024-04-23 21:02:38 +02:00
parent f8cefc511c
commit b00916229a
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

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