Update Test.gd a bit
This commit is contained in:
parent
5fed9c1f9b
commit
7e7fb03e54
1 changed files with 8 additions and 14 deletions
22
Test.gd
22
Test.gd
|
@ -22,16 +22,15 @@
|
|||
## For more permanent tests write a unit test instead.
|
||||
extends Node
|
||||
|
||||
# CORE Configuration
|
||||
var config: CoreConfiguration = CoreConfiguration.new()
|
||||
|
||||
# CORE Object
|
||||
var core: Core
|
||||
# Logger
|
||||
var config: CoreConfiguration = CoreConfiguration.new()
|
||||
@onready var logger: CoreLoggerInstance = core.logger.get_instance("Test.gd")
|
||||
|
||||
func _init() -> void:
|
||||
configure_core()
|
||||
# Update config keys
|
||||
config.headless = false
|
||||
config.debugging = true
|
||||
config.logger_level = CoreTypes.LoggerLevel.DIAG
|
||||
# Initialize CORE with custom config
|
||||
core = Core.new(config)
|
||||
|
||||
|
@ -40,21 +39,16 @@ func _ready() -> void:
|
|||
await get_tree().process_frame
|
||||
get_tree().root.add_child(core)
|
||||
await core.complete_init()
|
||||
|
||||
# Print information about CORE
|
||||
logger.info(await core.get_formatted_string("""Version information:
|
||||
Release (semantic) = %version_semantic%
|
||||
Release = %version%
|
||||
Typerelease = %version_type%
|
||||
Type = %type%
|
||||
Type (technical) = %type_technical%
|
||||
Type = %version_type%
|
||||
Type (technical) = %version_type_technical%
|
||||
Development mode = %devmode%
|
||||
Headless mode = %headless%
|
||||
Custom module support = %custommodules%"""))
|
||||
# Print hi
|
||||
logger.info("Hi there!")
|
||||
|
||||
# Update CORE configuration
|
||||
func configure_core() -> void:
|
||||
config.headless = false
|
||||
config.debugging = true
|
||||
config.logger_level = CoreTypes.LoggerLevel.DIAG
|
||||
|
|
Loading…
Reference in a new issue