Add "Internal, don't modify." descriptions
This commit is contained in:
parent
f8cefc511c
commit
b00916229a
1 changed files with 12 additions and 0 deletions
12
src/core.gd
12
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:
|
||||
|
|
Loading…
Reference in a new issue