xiandie/manager/config_manager/global_config.gd

75 lines
2.0 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class_name GlobalConfig extends Resource
const DEBUG = true
# const DEBUG = false
# .res would be binary encoded, .tres is text encoded
const RES_FILE_FORMAT = ".tres"
## layers
# 设置
const CANVAS_LAYER_SETTINGS = 30
# bag
const CANVAS_LAYER_BAG = 25
# dialog
const CANVAS_LAYER_DIALOG = 23
# main 场景的 UI 层prop hud、上下mask、notification
const CANVAS_LAYER_UI = 22
# 道具 inspectorprop/local
const CANVAS_LAYER_PROP_INSPECTOR = 20
# ground loader 转场等 mask 层
const CANVAS_LAYER_GROUND_MASK = 14
# 特殊全屏效果(无 shading
const CANVAS_LAYER_EFFECT = 5
# 全屏 shading
const CANVAS_LAYER_SHADING = 10
# 小游戏
const CANVAS_LAYER_LITTLE_GAME = 5
# 前景层
const CANVAS_LAYER_FG = 2
const DIALOG_IGNORE_INPUT = "ignore_input"
const CHARACTER_COLOR_MAP = {
"default": Color.LIGHT_SEA_GREEN,
"吕萍": Color.ORANGE,
"": Color.MEDIUM_SEA_GREEN,
"获得": Color.WHITE,
"小蝶": Color.MEDIUM_SPRING_GREEN,
"小蝉": Color.AQUA,
"陆仁": Color.POWDER_BLUE,
"李氏": Color.SKY_BLUE,
"方瞎子": Color.BURLYWOOD,
"张胖子": Color.DARK_KHAKI,
"王癞子": Color.AQUA,
"吕萍(母)": Color.AQUA,
}
signal current_selected_archive_id_changed
signal auto_save_enabled_changed
signal auto_save_seconds_changed
@export var game_total_seconds := 0 # 游戏总时长
@export var game_rounds := 1 # 当前周目数
@export var current_selected_archive_id := -1: # 当前选定存档, -1 为未选择
set(val):
current_selected_archive_id = val
current_selected_archive_id_changed.emit()
@export var auto_save_enabled := true:
set(val):
auto_save_enabled = val
auto_save_enabled_changed.emit()
@export var auto_save_seconds := 60:
set(val):
auto_save_seconds = val
auto_save_seconds_changed.emit()
# window
@export var window_fullscreen := false
@export var window_top := true
# sound
@export var db_master := linear_to_db(1.0) # default
@export var db_dialog := linear_to_db(0.7) # default
@export var db_game_sfx := linear_to_db(0.7) # default
# language
# -1 null; 0 zh_CN; 1 zh_SH; 2 en
@export var language := 0