Fix server file workspace null handling

This commit is contained in:
npc0-hue
2026-08-24 14:06:14 +08:00
parent 33d3a13e74
commit 504387c657
6 changed files with 190 additions and 7 deletions
@@ -628,6 +628,151 @@
"server.game-client.command",
"server.game-client.maintenance"
],
"fileWorkspace": {
"defaultDirectoryKey": "scum-config",
"directories": [
{
"key": "scum-config",
"label": "服务器配置",
"scope": "config"
},
{
"key": "scum-logs",
"label": "日志文件",
"scope": "logs"
}
],
"files": [
{
"key": "scum-server-settings",
"directoryKey": "scum-config",
"label": "ServerSettings.ini",
"kind": "config",
"editable": true
},
{
"key": "scum-admin-users",
"directoryKey": "scum-config",
"label": "AdminUsers.ini",
"kind": "config",
"editable": true
},
{
"key": "scum-banned-users",
"directoryKey": "scum-config",
"label": "BannedUsers.ini",
"kind": "config",
"editable": true
},
{
"key": "scum-whitelist-users",
"directoryKey": "scum-config",
"label": "WhitelistUsers.ini",
"kind": "config",
"editable": true
},
{
"key": "scum-server-log",
"directoryKey": "scum-logs",
"label": "Server.log",
"kind": "log",
"streamKey": "scum.server"
},
{
"key": "scum-chat-log",
"directoryKey": "scum-logs",
"label": "Chat.log",
"kind": "log",
"streamKey": "scum.chat"
},
{
"key": "scum-login-log",
"directoryKey": "scum-logs",
"label": "Login.log",
"kind": "log",
"streamKey": "scum.login"
},
{
"key": "scum-kill-log",
"directoryKey": "scum-logs",
"label": "Kill.log",
"kind": "log",
"streamKey": "scum.kill"
},
{
"key": "scum-admin-log",
"directoryKey": "scum-logs",
"label": "Admin.log",
"kind": "log",
"streamKey": "scum.admin"
},
{
"key": "scum-performance-log",
"directoryKey": "scum-logs",
"label": "Performance.log",
"kind": "log",
"streamKey": "scum.performance"
}
],
"configFields": [
{
"key": "server-name",
"fileKey": "scum-server-settings",
"configKey": "ServerName",
"label": "服务器名称",
"description": "显示在服务器浏览器与玩家连接界面。",
"control": "text",
"defaultValue": "SCUM Server",
"restartImpact": "restart-required"
},
{
"key": "game-port",
"fileKey": "scum-server-settings",
"configKey": "GamePort",
"label": "游戏端口",
"description": "玩家连接所使用的游戏端口。",
"control": "port",
"minimum": 1,
"maximum": 65535,
"defaultValue": "7779",
"restartImpact": "restart-required"
},
{
"key": "query-port",
"fileKey": "scum-server-settings",
"configKey": "QueryPort",
"label": "查询端口",
"description": "服务器查询和状态发现所使用的端口。",
"control": "port",
"minimum": 1,
"maximum": 65535,
"defaultValue": "27015",
"restartImpact": "restart-required"
},
{
"key": "max-players",
"fileKey": "scum-server-settings",
"configKey": "MaxPlayers",
"label": "最大玩家数",
"description": "允许同时进入服务器的玩家上限。",
"control": "number",
"minimum": 1,
"maximum": 128,
"defaultValue": "128",
"restartImpact": "restart-required"
},
{
"key": "welcome-message",
"fileKey": "scum-server-settings",
"configKey": "WelcomeMessage",
"label": "欢迎消息",
"description": "登录成功后由已声明的服务器扩展显示给玩家。",
"control": "text",
"defaultValue": "",
"restartImpact": "none"
}
]
},
"actions": {
"install": "actions/install.json",
"start": "actions/start.json",