Update Test.gd a bit

This commit is contained in:
JeremyStar™ 2024-04-08 20:15:00 +02:00
parent 5fed9c1f9b
commit 7e7fb03e54
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

22
Test.gd
View file

@ -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