# CORE FRAMEWORK SOURCE FILE # Copyright (c) 2024 The StarOpenSource Project & Contributors # Licensed in the Public Domain ## The framework configuration ## ## Provides the default configuration for the CORE Framework. extends Node class_name CoreConfiguration @export_category("Global") ## 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 ## Allows or disallows custom modules. @export var custom_modules: bool @export_category("Logger") ## The minimum log level you want to be displayed. @export var logger_level: CoreTypes.LoggerLevel ## Determines if the logger's output should be colored. @export var logger_colored: bool ## The template for all log messages.[br] ## Available placeholders are: [code]%time%[/code], [code]%time_ms%[/code], [code]%level%[/code], [code]%color%[/code], [code]%message%[/code], [code]%source%[/code], [code]%source_raw%[/code], [code]%function%[/code] and [code]%line%[/code] @export var logger_format: String ## Determines if identation should be provided if the logger encounters a newline. @export var logger_newlines_override: bool ## The maximum amount of characters excluding the message before newlines are no longer idented. Set to [code]-1[/code] to disable this behaviour. @export var logger_newlines_sizelimit: int @export_category("Log UI") ## Enables or disables Log UI. @export var logui_enabled: bool ## The Log UI background color. Set to [code]Color.TRANSPARENT[/code] for a transparent background. @export var logui_background_color: Color ## What font size the graphical log should have. @export var logui_font_size: int @export_category("Easy Request Maker") ## Determines how unsecure requests should be handled. @export var erm_unsecure_requests: CoreTypes.BlockadeLevel # Populates configuration with default values func _init() -> void: # Global headless = false debugging = false custom_modules = false # Logger logger_level = CoreTypes.LoggerLevel.INFO logger_colored = true logger_format = "%color%[%time%] [%level% %origin%] %message%" logger_newlines_override = true logger_newlines_sizelimit = 40 # Log UI logui_enabled = true logui_background_color = Color.BLACK # To disable the background, use Color.TRANSPARENT logui_font_size = 14 # Easy Request Maker erm_unsecure_requests = CoreTypes.BlockadeLevel.BLOCK