mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 11:25:56 +00:00
feat(preview): full modules UX redesign, custom races per-race toggles, time-is-time settings, clean names, and official protection
This commit is contained in:
1 parent
3e44ca7455
commit
4fbcc4d29b
13 files changed
+884
-74
No files matched your search
@@ -516,6 +516,16 @@ export interface ClientDownloadCheck {
|
||||
|
||||
export type ClientPatchState = "not-installed" | "enabled" | "disabled" | "partially-installed";
|
||||
|
||||
export interface RaceAvailability {
|
||||
realm: RealmMode;
|
||||
races: { id: number; name: string; faction: "alliance" | "horde" | null }[];
|
||||
disabledRaceIds: number[];
|
||||
catalogSha256: string;
|
||||
serverConfigSupported: boolean;
|
||||
catalogNeedsReview: boolean;
|
||||
unrecognizedRaceIds: number[];
|
||||
}
|
||||
|
||||
export interface CustomRacesClientStatus {
|
||||
version: string | null;
|
||||
state: ClientPatchState;
|
||||
@@ -681,6 +691,9 @@ export const api = {
|
||||
clientDownload: (id: string, parent: string) => invoke<ClientInfo>("client_download", { id, parent }),
|
||||
clientCancel: () => invoke<void>("client_cancel"),
|
||||
customRacesStatus: (id: string) => invoke<CustomRacesClientStatus | null>("custom_races_status", { id }),
|
||||
raceAvailability: (id: string) => invoke<RaceAvailability>("race_availability", { id }),
|
||||
raceAvailabilitySave: (id: string, catalogSha256: string, realm: RealmMode, disabledRaceIds: number[]) =>
|
||||
invoke<RaceAvailability>("race_availability_save", { id, catalogSha256, realm, disabledRaceIds }),
|
||||
customRacesUninstall: (id: string) => invoke<void>("custom_races_uninstall", { id }),
|
||||
customRacesInstall: (id: string) => invoke<void>("custom_races_install", { id }),
|
||||
customRacesToggleClient: (id: string, enabled: boolean) => invoke<void>("custom_races_toggle_client", { id, enabled }),
|
||||
|
||||
@@ -17,6 +17,11 @@ const fields = moduleSettingDefinitions;
|
||||
function add(key: string, type: string, title: string[], description: string[], extra: Partial<Entry> = {}) {
|
||||
fields.push({ key, type, title, description, ...extra });
|
||||
}
|
||||
add("TimeIsTime.Enable", "bool", ["Day and night cycle", "Смена дня и ночи", "Tag-Nacht-Zyklus", "Cycle jour-nuit", "Ciclo de día y noche", "昼夜循环"], ["Enable custom game time.", "Включает настройку игрового времени.", "Angepasste Spielzeit aktivieren.", "Active l’heure de jeu personnalisée.", "Activa la hora de juego personalizada.", "启用自定义游戏时间。"]);
|
||||
add("TimeIsTime.Announce", "bool", ["Announce on login", "Сообщение при входе", "Hinweis beim Anmelden", "Annonce à la connexion", "Aviso al entrar", "登录公告"], ["Show players a module announcement when they log in.", "Показывает игрокам сообщение о модуле при входе.", "Spielern beim Anmelden einen Modulhinweis anzeigen.", "Affiche un message sur le module à la connexion.", "Muestra un aviso sobre el módulo al entrar.", "玩家登录时显示模块公告。"]);
|
||||
add("TimeIsTime.SpeedRate", "float", ["Game time speed", "Скорость игрового времени", "Geschwindigkeit der Spielzeit", "Vitesse du temps en jeu", "Velocidad del tiempo de juego", "游戏时间速度"], ["1 = a 24-hour day; 7.5 = 3 hours 12 minutes; 60 = 24 minutes. 0 pauses the clock. Applies when players log in again.", "1 — сутки за 24 часа; 7.5 — за 3 часа 12 минут; 60 — за 24 минуты. 0 останавливает часы. Применяется после повторного входа игроков.", "1 = ein Tag in 24 Stunden; 7.5 = 3 Stunden 12 Minuten; 60 = 24 Minuten. 0 hält die Uhr an. Gilt nach erneuter Anmeldung.", "1 = une journée en 24 heures ; 7.5 = 3 h 12 ; 60 = 24 minutes. 0 arrête l’horloge. S’applique à la reconnexion des joueurs.", "1 = un día en 24 horas; 7.5 = 3 horas y 12 minutos; 60 = 24 minutos. 0 detiene el reloj. Se aplica cuando los jugadores vuelven a entrar.", "1表示一天为24小时;7.5为3小时12分钟;60为24分钟。0暂停时钟。玩家重新登录后生效。"], { min: 0, max: 60 });
|
||||
add("TimeIsTime.TimeStart", "int", ["Starting game time (Unix timestamp)", "Начальное игровое время (Unix timestamp)", "Spielstartzeit (Unix-Zeitstempel)", "Heure de départ (horodatage Unix)", "Hora inicial (marca de tiempo Unix)", "游戏初始时间(Unix时间戳)"], ["0 uses the server clock. A positive Unix timestamp sets the same starting date and time at every login. Applies when players log in again.", "0 — использовать часы сервера. Положительная метка Unix задаёт одинаковые начальные дату и время при каждом входе. Применяется после повторного входа игроков.", "0 nutzt die Serveruhr. Ein positiver Unix-Zeitstempel setzt bei jeder Anmeldung dieselbe Startzeit. Gilt nach erneuter Anmeldung.", "0 utilise l’horloge du serveur. Un horodatage Unix positif fixe la même date et heure à chaque connexion. S’applique à la reconnexion.", "0 usa el reloj del servidor. Una marca Unix positiva fija la misma fecha y hora inicial en cada entrada. Se aplica al volver a entrar.", "0使用服务器时钟。正Unix时间戳使每次登录都从同一日期和时间开始。重新登录后生效。"], { min: 0, max: 2147483647, advanced: true });
|
||||
add("TimeIsTime.HourOffset", "float", ["Starting time offset (hours)", "Смещение начального времени (часы)", "Versatz der Startzeit (Stunden)", "Décalage de départ (heures)", "Desfase de hora inicial (horas)", "初始时间偏移(小时)"], ["Added only when a positive starting timestamp is set. Fractional hours are allowed, for example 5.5. Applies when players log in again.", "Добавляется только при положительной начальной метке времени. Допустимы дробные часы, например 5.5. Применяется после повторного входа игроков.", "Wird nur bei positivem Startzeitstempel addiert. Bruchteile sind erlaubt, etwa 5.5 Stunden. Gilt nach erneuter Anmeldung.", "Ajouté uniquement avec un horodatage de départ positif. Les fractions sont acceptées, par exemple 5.5 heures. S’applique à la reconnexion.", "Se suma solo si la marca de tiempo inicial es positiva. Admite fracciones, por ejemplo 5.5 horas. Se aplica al volver a entrar.", "仅在初始时间戳为正时叠加。支持小数小时,例如5.5。重新登录后生效。"], { min: -24, max: 24, advanced: true });
|
||||
add("AiPlayerbot.RandomBotAutologin", "bool", ["Populate the world automatically", "Автоматически населять мир", "Welt automatisch bevölkern", "Peupler automatiquement le monde", "Poblar el mundo automáticamente", "自动填充世界"], ["Log random bots into the world when the server starts.", "Вводит случайных ботов в мир при запуске сервера.", "Meldet Zufallsbots beim Serverstart in der Welt an.", "Connecte les bots aléatoires au démarrage du serveur.", "Conecta bots aleatorios al iniciar el servidor.", "服务器启动时让随机机器人登录世界。"]);
|
||||
add("AiPlayerbot.MinRandomBots", "int", ["Minimum online bots", "Минимум ботов онлайн", "Mindestens aktive Bots", "Minimum de bots connectés", "Mínimo de bots conectados", "最少在线机器人"], ["Lower limit of the automatically selected online population. Must not exceed the maximum.", "Нижний предел автоматически выбираемого числа ботов онлайн. Не должен превышать максимум.", "Untergrenze der automatisch gewählten Bot-Zahl. Darf das Maximum nicht überschreiten.", "Limite basse du nombre de bots connectés. Ne doit pas dépasser le maximum.", "Límite inferior de bots conectados. No debe superar el máximo.", "自动选择的在线机器人数量下限,不得超过上限。"], { min: 0 });
|
||||
add("AiPlayerbot.MaxRandomBots", "int", ["Maximum online bots", "Максимум ботов онлайн", "Maximal aktive Bots", "Maximum de bots connectés", "Máximo de bots conectados", "最多在线机器人"], ["Upper limit of the random bot population; more bots use more server resources.", "Верхний предел числа случайных ботов онлайн. Больше ботов — выше нагрузка на сервер.", "Obergrenze der Zufallsbots; mehr Bots benötigen mehr Serverressourcen.", "Limite haute des bots aléatoires ; plus de bots utilisent plus de ressources.", "Límite superior de bots aleatorios; más bots requieren más recursos del servidor.", "随机机器人在线数量上限,数量越多越占用服务器资源。"], { min: 0 });
|
||||
@@ -72,8 +77,10 @@ add(scaling + "LFG.DefaultMode", "enum", ["Dungeon Finder group", "Группа
|
||||
] });
|
||||
add(scaling + "LFG.DefaultChallengeSize", "int", ["Challenge group size", "Размер группы для расчёта сложности", "Gruppengröße für die Schwierigkeit", "Taille du groupe pour la difficulté", "Tamaño del grupo para dificultad", "难度目标人数"], ["0 follows actual party size. 1–40 simulates that many players. Players can override with .lfgchallenge.", "0 — реальный размер группы. 1–40 — сложность как для указанного числа игроков. Игрок может изменить через .lfgchallenge.", "0 nutzt die tatsächliche Gruppe. 1–40 simuliert diese Spielerzahl. Mit .lfgchallenge änderbar.", "0 suit le groupe réel. 1–40 simule ce nombre de joueurs. Modifiable avec .lfgchallenge.", "0 usa el grupo real. 1–40 simula ese número de jugadores. Modificable con .lfgchallenge.", "0按实际人数,1–40模拟指定人数。玩家可通过 .lfgchallenge 更改。"], { min: 0, max: 40 });
|
||||
add(scaling + "GroupScaling.LockOnEncounterStart", "bool", ["Lock scaling during combat", "Фиксировать скейлинг на время боя", "Skalierung im Kampf sperren", "Figer l’adaptation en combat", "Fijar ajuste durante combate", "战斗期间锁定缩放"], ["Joining or leaving during a boss fight does not change its scaling.", "Вход и выход игроков во время боя с боссом не меняют скейлинг.", "Beitreten oder Verlassen während eines Bosskampfs ändert die Skalierung nicht.", "Les arrivées et départs pendant un boss ne changent pas l’adaptation.", "Entrar o salir durante un jefe no cambia el ajuste.", "首领战期间玩家进出不会改变缩放。"], { advanced: true });
|
||||
add(scaling + "Progression.Mode", "enum", ["Progression boundaries", "Границы прогрессии", "Fortschrittsgrenzen", "Limites de progression", "Límites de progresión", "进度边界"], ["Automatic boundaries follow the level cap and enabled expansions. Custom uses the levels below.", "Автоматические границы зависят от максимального уровня и включённых дополнений. Ручные используют уровни ниже.", "Automatisch folgt der Maximalstufe und Erweiterungen. Benutzerdefiniert nutzt die folgenden Stufen.", "Automatique suit le niveau maximal et les extensions. Manuel utilise les niveaux ci-dessous.", "Automático sigue el nivel máximo y las expansiones. Manual usa los niveles siguientes.", "自动边界按等级上限和启用的资料片计算,自定义使用以下等级。"], { advanced: true, options: [
|
||||
add(scaling + "Progression.Mode", "enum", ["Progression boundaries", "Границы прогрессии", "Fortschrittsgrenzen", "Limites de progression", "Límites de progresión", "进度边界"], ["Automatic splits the level cap between the expansions one after another. Parallel scales Classic over 1 to the level cap and TBC and WotLK over 45 to the level cap. Global scales every expansion over 1 to the level cap. Custom uses the levels below.", "Автоматически делит максимальный уровень между дополнениями по очереди. Параллельно: классика на уровнях 1 — максимум, TBC и WotLK на 45 — максимум. Глобально: все дополнения на 1 — максимум. Вручную использует уровни ниже.", "Automatisch teilt die Maximalstufe nacheinander auf die Erweiterungen auf. Parallel skaliert Classic über 1 bis zur Maximalstufe und TBC und WotLK über 45 bis zur Maximalstufe. Global skaliert alle Erweiterungen über 1 bis zur Maximalstufe. Benutzerdefiniert nutzt die folgenden Stufen.", "Automatique répartit le niveau maximal entre les extensions l'une après l'autre. Parallèle étend Classic de 1 au niveau maximal, TBC et WotLK de 45 au niveau maximal. Global étend toutes les extensions de 1 au niveau maximal. Manuel utilise les niveaux ci-dessous.", "Automático reparte el nivel máximo entre las expansiones una tras otra. Paralelo escala Classic de 1 al nivel máximo y TBC y WotLK de 45 al nivel máximo. Global escala todas las expansiones de 1 al nivel máximo. Manual usa los niveles siguientes.", "自动:按顺序在各资料片之间分配等级上限。并行:经典旧世为 1 至等级上限,TBC 和 WotLK 为 45 至等级上限。全局:所有资料片均为 1 至等级上限。自定义:使用以下等级。"], { advanced: true, options: [
|
||||
{ value: "Auto", label: ["Automatic", "Автоматически", "Automatisch", "Automatique", "Automático", "自动"] },
|
||||
{ value: "Parallel", label: ["Parallel (Classic 1-cap, TBC/WotLK 45-cap)", "Параллельно (классика 1–макс., TBC/WotLK 45–макс.)", "Parallel (Classic 1–Max., TBC/WotLK 45–Max.)", "Parallèle (Classic 1–max., TBC/WotLK 45–max.)", "Paralelo (Classic 1–máx., TBC/WotLK 45–máx.)", "并行(经典 1–上限,TBC/WotLK 45–上限)"] },
|
||||
{ value: "Global", label: ["Global (everything 1-cap)", "Глобально (всё на 1–макс.)", "Global (alles 1–Max.)", "Global (tout 1–max.)", "Global (todo 1–máx.)", "全局(全部 1–上限)"] },
|
||||
{ value: "Custom", label: ["Custom", "Вручную", "Benutzerdefiniert", "Manuel", "Manual", "自定义"] },
|
||||
] });
|
||||
for (const era of ["Classic", "Tbc"]) add(scaling + `Progression.${era}End`, "int", [`${era} last level`, `Последний уровень ${era}`, `${era}-Endstufe`, `Dernier niveau ${era}`, `Último nivel ${era}`, `${era} 最高等级`], ["Used in custom progression. 0 chooses automatically.", "Для ручной прогрессии. 0 — автоматически.", "Für benutzerdefinierten Fortschritt. 0 wählt automatisch.", "Pour la progression manuelle. 0 choisit automatiquement.", "Para progresión manual. 0 elige automáticamente.", "用于自定义进度,0为自动。"], { min: 0, max: 80, advanced: true });
|
||||
@@ -104,7 +111,6 @@ add("CoACustomRaces.BotsEnable", "bool",
|
||||
|
||||
const ah = "AuctionHouseBot.";
|
||||
add(ah + "GUIDs", "string", ["Auction characters", "Персонажи аукциона", "Auktionscharaktere", "Personnages d’enchères", "Personajes de subasta", "拍卖角色"], ["Leave 0 and the server creates and uses its own auction character. To use your own, enter GUIDs separated by commas, without spaces; use dedicated offline characters, not companion bots.", "Оставьте 0, и сервер сам создаст и будет использовать своего персонажа аукциона. Чтобы использовать своих, укажите GUID через запятую без пробелов; нужны отдельные офлайн-персонажи, не боты-компаньоны.", "Bei 0 legt der Server selbst einen Auktionscharakter an und nutzt ihn. Eigene Charaktere: GUIDs durch Kommas, ohne Leerzeichen; separate Offline-Charaktere verwenden, keine Begleiter-Bots.", "Laissez 0 : le serveur crée et utilise son propre personnage d’enchères. Pour les vôtres, indiquez des GUID séparés par des virgules sans espaces ; personnages dédiés hors ligne, pas des bots compagnons.", "Deja 0 y el servidor crea y usa su propio personaje de subastas. Para usar los tuyos, indica GUID separados por comas sin espacios; personajes dedicados desconectados, no bots acompañantes.", "保持0时由服务器自动创建并使用拍卖角色。要使用自己的角色,请以逗号分隔填写GUID,不加空格;使用专用离线角色,勿用伙伴机器人。"], { advanced: true });
|
||||
add(ah + "EnableSeller", "bool", ["Post auctions", "Выставлять лоты", "Auktionen einstellen", "Publier des enchères", "Publicar subastas", "发布拍卖"], ["Let the auction characters sell items. The module switch is also required.", "Разрешает персонажам продавать предметы. Нужен включённый модуль.", "Erlaubt Verkäufe. Der Modulschalter muss ebenfalls aktiv sein.", "Autorise les ventes. Le module doit aussi être activé.", "Permite vender. También requiere el módulo activado.", "允许拍卖角色出售物品,还需启用模块。"]);
|
||||
add(ah + "CoA.ObtainableItemsOnly", "bool", ["Only obtainable items", "Только доступные в игре предметы", "Nur erhältliche Gegenstände", "Objets accessibles uniquement", "Solo objetos obtenibles", "仅可获取物品"], ["List items from world loot, vendors and professions. Other item filters still apply.", "Выставляет предметы из добычи, торговцев и профессий. Остальные фильтры продолжают действовать.", "Listet Gegenstände aus Beute, Händlern und Berufen. Weitere Filter gelten weiterhin.", "Publie les objets de butin, vendeurs et métiers. Les autres filtres s’appliquent.", "Publica objetos de botín, vendedores y profesiones. Los demás filtros siguen activos.", "发布来自掉落、商人和专业的物品,其他筛选仍生效。"]);
|
||||
add(ah + "ItemsPerCycle", "int", ["Listings per cycle", "Лотов за цикл", "Angebote pro Durchlauf", "Annonces par cycle", "Anuncios por ciclo", "每轮上架数量"], ["Maximum items posted during one auction update.", "Максимум предметов за одно обновление аукциона.", "Maximale Angebote pro Auktionsaktualisierung.", "Nombre maximal d’objets par mise à jour.", "Máximo de objetos por actualización.", "每轮拍卖更新最多上架的物品数量。"], { min: 0 });
|
||||
for (const [kind, titles] of [
|
||||
@@ -138,6 +144,7 @@ for (const [prefix, labels, bounds, titles] of [
|
||||
add(ah + prefix + ".Enabled", "bool", labels, desc);
|
||||
bounds.forEach((bound, i) => add(ah + prefix + "." + bound, "int", [`${titles[0]}: ${i ? "maximum" : "minimum"}`, `${titles[1]}: ${i ? "максимум" : "минимум"}`, `${titles[2]}: ${i ? "Maximum" : "Minimum"}`, `${titles[3]} : ${i ? "maximum" : "minimum"}`, `${titles[4]}: ${i ? "máximo" : "mínimo"}`, `${titles[5]}:${i ? "最大" : "最小"}`], desc, { min: 0 }));
|
||||
}
|
||||
export const retiredModuleKeys = new Set(["AuctionHouseBot.EnableSeller"]);
|
||||
export function moduleEnableKey(id: string) { return catalog.modules.find(m => m.id === id)?.enable_key; }
|
||||
export const auctionCategories: Record<string, string[]> = {
|
||||
Consumable: ["Consumables", "Расходники", "Verbrauchsgüter", "Consommables", "Consumibles", "消耗品"],
|
||||
@@ -208,6 +215,6 @@ export function canonicalModuleValue(key: string, value: string): string {
|
||||
const v = value.trim().replace(/^"|"$/g, "");
|
||||
if (key === scaling + "SoloAssist.Mode") return ({ "0": "None", "1": "Light", "2": "Full", none: "None", light: "Light", full: "Full" } as Record<string, string>)[v.toLowerCase()] ?? v;
|
||||
if (key === scaling + "LFG.DefaultMode") return ({ "0": "Matchmaking", "1": "BotFill", "2": "CurrentParty", matchmaking: "Matchmaking", botfill: "BotFill", currentparty: "CurrentParty" } as Record<string, string>)[v.toLowerCase()] ?? v;
|
||||
if (key === scaling + "Progression.Mode") return v.toLowerCase() === "auto" ? "Auto" : v.toLowerCase() === "custom" ? "Custom" : v;
|
||||
if (key === scaling + "Progression.Mode") return ({ auto: "Auto", parallel: "Parallel", global: "Global", all: "Global", "1-60": "Global", custom: "Custom" } as Record<string, string>)[v.toLowerCase()] ?? v;
|
||||
return v;
|
||||
}
|
||||
Reference in new issue
Block a user