Update development mode
This commit is contained in:
parent
10c5cfd134
commit
bf7eacdb39
5 changed files with 11 additions and 14 deletions
2
Test.gd
2
Test.gd
|
@ -29,7 +29,7 @@ var config: CoreConfiguration = CoreConfiguration.new()
|
|||
func _init() -> void:
|
||||
# Update config keys
|
||||
config.headless = false
|
||||
config.debugging = true
|
||||
config.development = true
|
||||
config.logger_level = CoreTypes.LoggerLevel.DIAG
|
||||
# Initialize CORE with custom config
|
||||
core = Core.new(config)
|
||||
|
|
|
@ -88,7 +88,7 @@ Applies the a configuration.
|
|||
Makes sure that CORE does not leak memory on shutdown/unload. \
|
||||
Unloads all custom modules, built-in modules, frees any of CORE's classes and lastly itself.
|
||||
### *bool* <u>is_devmode</u>()
|
||||
Returns if the CORE Framework is in development mode.
|
||||
Returns if the framework is in development mode.
|
||||
### *String* <u>get_format_string</u>(*String* <u>string</u>)
|
||||
Replaces placeholders with human-friendly strings. \
|
||||
You can use the following placeholders:
|
||||
|
|
|
@ -12,11 +12,9 @@ All settings are variables.
|
|||
## Global
|
||||
### *bool* <u>headless</u> = *false*
|
||||
Controls CORE's functionality. Renders GUI-related modules useless when set to `false`, which is the recommended behaviour on servers. For CORE's full functionality, set this to `true`.
|
||||
### *bool* <u>debugging</u> = *false*
|
||||
:::note
|
||||
This will not enable the development mode automatically, only if you're developing on CORE itself.
|
||||
:::
|
||||
Allows debugging functionality if set to `true`, or not if set to `false`.
|
||||
### *bool* <u>development</u> = *false*
|
||||
Puts the framework into development mode. \
|
||||
Unlocks experimental features.
|
||||
### *bool* <u>custom_modules</u> = *false*
|
||||
Allows or disallows custom modules.
|
||||
|
||||
|
|
|
@ -12,10 +12,9 @@ class_name CoreConfiguration
|
|||
## Controls CORE's functionality.[br]
|
||||
## Renders GUI-related modules useless when set to [code]false[/code], which is the recommended behaviour on servers. For CORE's full functionality, set this to [code]true[/code].
|
||||
@export var headless: bool
|
||||
## Allows debugging functionality if set to [code]true[/code], or not if set to [code]false[/code].[br]
|
||||
## [br]
|
||||
## [b]Note: [i]This will not enable the development mode automatically, only if you're developing on CORE itself.[/i][/b]
|
||||
@export var debugging: bool
|
||||
## Puts the framework into development mode.[br]
|
||||
## Unlocks experimental features.
|
||||
@export var development: bool
|
||||
## Allows or disallows custom modules.
|
||||
@export var custom_modules: bool
|
||||
@export_category("Logger")
|
||||
|
@ -45,7 +44,7 @@ class_name CoreConfiguration
|
|||
func _init() -> void:
|
||||
# Global
|
||||
headless = false
|
||||
debugging = false
|
||||
development = false
|
||||
custom_modules = false
|
||||
|
||||
# Logger
|
||||
|
|
|
@ -219,9 +219,9 @@ func cleanup() -> void:
|
|||
custom_modules_node.queue_free()
|
||||
queue_free()
|
||||
|
||||
## Returns if the CORE Framework is in development mode.
|
||||
## Returns if the framework is in development mode.
|
||||
func is_devmode() -> bool:
|
||||
return config.debugging and basepath == "res://" and OS.is_debug_build()
|
||||
return config.development
|
||||
|
||||
## Replaces placeholders with human-friendly strings.[br]
|
||||
## You can use the following placeholders:[br]
|
||||
|
|
Loading…
Reference in a new issue