From bf7eacdb398cf24860b7fffa8a861c2fca205b2d Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Tue, 9 Apr 2024 00:53:43 +0200 Subject: [PATCH] Update development mode --- Test.gd | 2 +- docs/docs/reference/core.md | 2 +- docs/docs/reference/coreconfiguration.md | 8 +++----- src/classes/config.gd | 9 ++++----- src/core.gd | 4 ++-- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Test.gd b/Test.gd index 0ca8be3..2c0cdd2 100644 --- a/Test.gd +++ b/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) diff --git a/docs/docs/reference/core.md b/docs/docs/reference/core.md index 7793fd2..d3257b8 100644 --- a/docs/docs/reference/core.md +++ b/docs/docs/reference/core.md @@ -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* is_devmode() -Returns if the CORE Framework is in development mode. +Returns if the framework is in development mode. ### *String* get_format_string(*String* string) Replaces placeholders with human-friendly strings. \ You can use the following placeholders: diff --git a/docs/docs/reference/coreconfiguration.md b/docs/docs/reference/coreconfiguration.md index 10519dc..349f08e 100644 --- a/docs/docs/reference/coreconfiguration.md +++ b/docs/docs/reference/coreconfiguration.md @@ -12,11 +12,9 @@ All settings are variables. ## Global ### *bool* headless = *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* debugging = *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* development = *false* +Puts the framework into development mode. \ +Unlocks experimental features. ### *bool* custom_modules = *false* Allows or disallows custom modules. diff --git a/src/classes/config.gd b/src/classes/config.gd index 5edbd68..132b8ae 100644 --- a/src/classes/config.gd +++ b/src/classes/config.gd @@ -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 diff --git a/src/core.gd b/src/core.gd index 31ea853..5a1daad 100644 --- a/src/core.gd +++ b/src/core.gd @@ -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]