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.
|
## For more permanent tests write a unit test instead.
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
# CORE Configuration
|
|
||||||
var config: CoreConfiguration = CoreConfiguration.new()
|
|
||||||
|
|
||||||
# CORE Object
|
|
||||||
var core: Core
|
var core: Core
|
||||||
# Logger
|
var config: CoreConfiguration = CoreConfiguration.new()
|
||||||
@onready var logger: CoreLoggerInstance = core.logger.get_instance("Test.gd")
|
@onready var logger: CoreLoggerInstance = core.logger.get_instance("Test.gd")
|
||||||
|
|
||||||
func _init() -> void:
|
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
|
# Initialize CORE with custom config
|
||||||
core = Core.new(config)
|
core = Core.new(config)
|
||||||
|
|
||||||
|
@ -40,21 +39,16 @@ func _ready() -> void:
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
get_tree().root.add_child(core)
|
get_tree().root.add_child(core)
|
||||||
await core.complete_init()
|
await core.complete_init()
|
||||||
|
|
||||||
# Print information about CORE
|
# Print information about CORE
|
||||||
logger.info(await core.get_formatted_string("""Version information:
|
logger.info(await core.get_formatted_string("""Version information:
|
||||||
Release (semantic) = %version_semantic%
|
Release (semantic) = %version_semantic%
|
||||||
Release = %version%
|
Release = %version%
|
||||||
Typerelease = %version_type%
|
Typerelease = %version_type%
|
||||||
Type = %type%
|
Type = %version_type%
|
||||||
Type (technical) = %type_technical%
|
Type (technical) = %version_type_technical%
|
||||||
Development mode = %devmode%
|
Development mode = %devmode%
|
||||||
Headless mode = %headless%
|
Headless mode = %headless%
|
||||||
Custom module support = %custommodules%"""))
|
Custom module support = %custommodules%"""))
|
||||||
# Print hi
|
# Print hi
|
||||||
logger.info("Hi there!")
|
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