ConfigManager改全局单例

This commit is contained in:
2025-08-15 15:24:31 +08:00
parent 30e8effe86
commit 599c98f135
9 changed files with 361 additions and 376 deletions
+10
View File
@@ -194,6 +194,7 @@ export class GlobalConfig {
this.MaxTokens = _buf_.readInt()
this.Timeout = _buf_.readInt()
this.FreeChatTimes = _buf_.readInt()
this.GameName = _buf_.readString()
}
/**
@@ -217,6 +218,10 @@ export class GlobalConfig {
* 单个角色免费聊天次数
*/
readonly FreeChatTimes: number
/**
* 游戏名
*/
readonly GameName: string
resolve(tables:Tables) {
@@ -225,6 +230,7 @@ export class GlobalConfig {
}
}
@@ -630,6 +636,10 @@ export class TbGlobalConfig {
* 单个角色免费聊天次数
*/
get FreeChatTimes(): number { return this._data.FreeChatTimes; }
/**
* 游戏名
*/
get GameName(): string { return this._data.GameName; }
resolve(tables:Tables) {
this._data.resolve(tables)