66 lines
2.9 KiB
GDScript3
66 lines
2.9 KiB
GDScript3
|
# CORE FRAMEWORK SOURCE FILE
|
||
|
# Copyright (c) 2024 The StarOpenSource Project & Contributors
|
||
|
# Licensed in the Public Domain
|
||
|
|
||
|
## The default configuration file for the CORE Framework.
|
||
|
##
|
||
|
## The [code]CoreConfiguration[/code] class holds the Framework's settings.
|
||
|
## The default configuration is designed to be usable without any modification.
|
||
|
extends Node
|
||
|
class_name CoreConfiguration
|
||
|
|
||
|
@export_category("Global")
|
||
|
## Controls CORE's functionality.
|
||
|
## 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]
|
||
|
## Note: This will not enable the development mode automatically, only if you're developing on CORE itself.
|
||
|
@export var debugging: bool
|
||
|
## Allows or disallows custom modules.
|
||
|
@export var custom_modules: bool
|
||
|
@export_category("Logger")
|
||
|
## I don't have to explain this, do I?
|
||
|
@export var logger_level: CoreTypes.LoggerLevel
|
||
|
## Toggles colored output. Set to [code]false[/code] if you don't want that.
|
||
|
@export var logger_colored: bool
|
||
|
## The format string the logger will operate on. 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
|
||
|
## This example should make it clear, what this does:
|
||
|
## [codeblock]
|
||
|
## logger_newlines_override = true:
|
||
|
## [09:47:00] [INFO Test.gd:69] This is a test message...
|
||
|
## with a newline!
|
||
|
## logger_newlines_override = false:
|
||
|
## [09:47:00] [INFO Test.gd:69] This is a test message...
|
||
|
## with a newline!
|
||
|
## [/codeblock]
|
||
|
@export var logger_newlines_override: bool
|
||
|
## The maximum amount of characters than can appear before [code]%message%[/code] before newlines won't be overriden. Setting this variable to [code]-1[/code] disables this behaviour.
|
||
|
@export var logger_newlines_sizelimit: int
|
||
|
@export_category("LogUI")
|
||
|
## Determines if [code]LogUI[/code] should be visible or not.
|
||
|
@export var logui_enabled: bool
|
||
|
## The color the [code]LogUI[/code] background will have. Set to [code]Color.TRANSPARENT[/code] for a transparent background.
|
||
|
@export var logui_background_color: Color
|
||
|
## What size the graphical log should have.
|
||
|
@export var logui_font_size: int
|
||
|
|
||
|
# 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
|
||
|
# LogUI
|
||
|
logui_enabled = true
|
||
|
logui_background_color = Color.BLACK # To disable the background, use Color.TRANSPARENT
|
||
|
logui_font_size = 14
|