Add server configuration editor

This commit is contained in:
npc0-hue
2026-09-11 11:40:06 +08:00
parent 8c924b5928
commit 8e6d12f6f1
9 changed files with 277 additions and 33 deletions
@@ -596,41 +596,17 @@
{
"key": "server-name",
"fileKey": "scum-server-settings",
"configKey": "ServerName",
"configKey": "scum.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",
"configKey": "scum.MaxPlayers",
"label": "最大玩家数",
"description": "允许同时进入服务器的玩家上限。",
"control": "number",
@@ -642,12 +618,92 @@
{
"key": "welcome-message",
"fileKey": "scum-server-settings",
"configKey": "WelcomeMessage",
"configKey": "scum.WelcomeMessage",
"label": "欢迎消息",
"description": "登录成功后由已声明的服务器扩展显示给玩家。",
"control": "text",
"defaultValue": "",
"restartImpact": "none"
},
{
"key": "server-description",
"fileKey": "scum-server-settings",
"configKey": "scum.ServerDescription",
"label": "服务器描述",
"description": "显示在服务器列表中的详细描述。",
"control": "text",
"defaultValue": "",
"restartImpact": "restart-required"
},
{
"key": "server-password",
"fileKey": "scum-server-settings",
"configKey": "scum.ServerPassword",
"label": "服务器密码",
"description": "留空表示不设置连接密码。",
"control": "text",
"defaultValue": "",
"restartImpact": "restart-required"
},
{
"key": "server-playstyle",
"fileKey": "scum-server-settings",
"configKey": "scum.ServerPlaystyle",
"label": "服务器玩法",
"description": "服务器使用的玩法类型,例如 PVE 或 PVP。",
"control": "text",
"defaultValue": "PVE",
"restartImpact": "restart-required"
},
{
"key": "message-of-the-day",
"fileKey": "scum-server-settings",
"configKey": "scum.MessageOfTheDay",
"label": "每日公告",
"description": "玩家进入服务器后看到的每日公告。",
"control": "text",
"defaultValue": "",
"restartImpact": "none"
},
{
"key": "allow-first-person",
"fileKey": "scum-server-settings",
"configKey": "scum.AllowFirstPerson",
"label": "允许第一人称",
"description": "允许玩家使用第一人称视角。",
"control": "boolean",
"defaultValue": "True",
"restartImpact": "restart-required"
},
{
"key": "allow-third-person",
"fileKey": "scum-server-settings",
"configKey": "scum.AllowThirdPerson",
"label": "允许第三人称",
"description": "允许玩家使用第三人称视角。",
"control": "boolean",
"defaultValue": "True",
"restartImpact": "restart-required"
},
{
"key": "allow-global-chat",
"fileKey": "scum-server-settings",
"configKey": "scum.AllowGlobalChat",
"label": "允许公频聊天",
"description": "允许玩家使用公频聊天。",
"control": "boolean",
"defaultValue": "True",
"restartImpact": "none"
},
{
"key": "disable-base-building",
"fileKey": "scum-server-settings",
"configKey": "scum.DisableBaseBuilding",
"label": "禁用建家",
"description": "是否完全禁止玩家建造基地。",
"control": "boolean",
"defaultValue": "False",
"restartImpact": "restart-required"
}
]
},