2024-02-12 19:47:28 +01:00
# CORE FRAMEWORK SOURCE FILE
# Copyright (c) 2024 The StarOpenSource Project & Contributors
2024-03-03 18:53:09 +01:00
# Licensed in the Public Domain
2024-02-12 19:47:28 +01:00
2024-04-08 20:14:38 +02:00
## The framework configuration
##
## Provides the default configuration for the CORE Framework.
2024-02-04 21:36:30 +01:00
extends Node
class_name CoreConfiguration
@ export_category ( " Global " )
2024-04-08 02:43:31 +02:00
## Controls CORE's functionality.[br]
2024-02-12 19:47:28 +01:00
## 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].
2024-02-04 21:36:30 +01:00
@ export var headless : bool
2024-02-12 19:47:28 +01:00
## Allows debugging functionality if set to [code]true[/code], or not if set to [code]false[/code].[br]
## [br]
2024-04-08 21:19:24 +02:00
## [b]Note: [i]This will not enable the development mode automatically, only if you're developing on CORE itself.[/i][/b]
2024-02-10 18:49:25 +01:00
@ export var debugging : bool
2024-02-12 19:47:28 +01:00
## Allows or disallows custom modules.
2024-02-10 18:49:25 +01:00
@ export var custom_modules : bool
2024-02-04 21:36:30 +01:00
@ export_category ( " Logger " )
2024-04-08 20:14:38 +02:00
## The minimum log level you want to be displayed.
2024-02-04 21:36:30 +01:00
@ export var logger_level : CoreTypes . LoggerLevel
2024-04-08 20:14:38 +02:00
## Determines if the logger's output should be colored.
2024-02-04 21:36:30 +01:00
@ export var logger_colored : bool
2024-04-08 20:14:38 +02:00
## 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]
2024-02-04 21:36:30 +01:00
@ export var logger_format : String
2024-04-08 20:14:38 +02:00
## Determines if identation should be provided if the logger encounters a newline.
2024-02-04 21:36:30 +01:00
@ export var logger_newlines_override : bool
2024-04-08 20:14:38 +02:00
## The maximum amount of characters excluding the message before newlines are no longer idented. Set to [code]-1[/code] to disable this behaviour.
2024-02-04 21:36:30 +01:00
@ export var logger_newlines_sizelimit : int
2024-04-08 20:14:38 +02:00
@ export_category ( " Log UI " )
## Enables or disables Log UI.
2024-02-09 14:27:55 +01:00
@ export var logui_enabled : bool
2024-04-08 20:14:38 +02:00
## The Log UI background color. Set to [code]Color.TRANSPARENT[/code] for a transparent background.
2024-02-04 21:36:30 +01:00
@ export var logui_background_color : Color
2024-04-08 20:14:38 +02:00
## What font size the graphical log should have.
2024-02-04 21:36:30 +01:00
@ export var logui_font_size : int
2024-04-08 16:42:03 +02:00
@ export_category ( " Easy Request Maker " )
## Determines how unsecure requests should be handled.
@ export var erm_unsecure_requests : CoreTypes . BlockadeLevel
2024-02-04 21:36:30 +01:00
2024-03-03 18:53:09 +01:00
# Populates configuration with default values
2024-02-04 21:36:30 +01:00
func _init ( ) - > void :
# Global
headless = false
2024-02-10 18:49:25 +01:00
debugging = false
custom_modules = false
2024-02-04 21:36:30 +01:00
# Logger
logger_level = CoreTypes . LoggerLevel . INFO
logger_colored = true
2024-03-05 21:32:13 +01:00
logger_format = " %c olor % [ % time % ] [ %le vel % % origin % ] % message % "
2024-02-04 21:36:30 +01:00
logger_newlines_override = true
logger_newlines_sizelimit = 40
2024-04-08 20:14:38 +02:00
# Log UI
2024-02-09 14:27:55 +01:00
logui_enabled = true
logui_background_color = Color . BLACK # To disable the background, use Color.TRANSPARENT
2024-02-04 21:36:30 +01:00
logui_font_size = 14
2024-04-08 16:42:03 +02:00
# Easy Request Maker
erm_unsecure_requests = CoreTypes . BlockadeLevel . BLOCK