feat(modules): add custom races module to catalog and UI

This commit is contained in:
Дмитрий committed 2026-10-08 14:13:43 +05:00
1 parent 7540527d30
commit 06ca748e80
3 files changed
+25 -1

No files matched your search

+18
View File
@@ -121,6 +121,24 @@
"default_on": false,
"page": "bots"
},
{
"id": "custom-races",
"name": "Custom Races",
"description": {
"en": "Playable custom races (Esteria and additional races) with extended appearances.",
"ru": "Пользовательские расы (Esteria и дополнительные расы) с расширенной внешностью.",
"de": "Spielbare benutzerdefinierte Völker (Esteria und weitere Völker) mit erweitertem Aussehen.",
"fr": "Races personnalisées jouables (Esteria et autres) avec apparences étendues.",
"es": "Razas personalizadas jugables (Esteria y razas adicionales) con apariencias ampliadas."
},
"repo": "https://github.com/Corfirean/azerothcore-wotlk-coa",
"conf": "coa_custom_races.conf",
"switchable": true,
"status": "beta",
"icon": "races",
"enable_key": "CoACustomRaces.Enable",
"default_on": false
},
{
"id": "client-compat",
"name": "Client compatibility",
+5
View File
@@ -85,6 +85,11 @@ for (const [key, title, desc] of [
] as [string, string[], string[]][]) add(`Enchanter.${key}`, "int", title, desc, { min: 0, advanced: true });
for (let n = 1; n <= 3; n++) add(`EC.P${n}`, "string", [`NPC phrase ${n}`, `Реплика НПС ${n}`, `NPC-Satz ${n}`, `Phrase du PNJ ${n}`, `Frase del PNJ ${n}`, `NPC台词 ${n}`], ["Text spoken by the NPC. Keep the enclosing quotes.", "Текст реплики НПС. Сохраните кавычки вокруг текста.", "Gesprochener Text. Anführungszeichen beibehalten.", "Texte prononcé. Conservez les guillemets.", "Texto hablado. Conserva las comillas.", "NPC发言内容,请保留外层引号。"], { advanced: true });
add("CoACustomRaces.BotsEnable", "bool",
["Bots can be custom races", "Боты кастомных рас", "Bots benutzerdefinierter Völker", "Bots de races personnalisées", "Bots de razas personalizadas", "允许机器人为自定义种族"],
["Allow Playerbots to spawn as custom races.", "Разрешает ботам-игрокам появляться кастомными расами.", "Erlaubt Spieler-Bots, benutzerdefinierte Völker zu nutzen.", "Autorise les bots joueurs à s’incarner avec des races personnalisées.", "Permite a los bots jugadores crearse con razas personalizadas.", "允许玩家机器人扮演自定义种族。"]
);
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.", "允许拍卖角色出售物品,还需启用模块。"]);
+2 -1
View File
@@ -1,5 +1,5 @@
import { Fragment, useCallback, useEffect, useRef, useState, type ComponentType, type ReactNode } from "react";
import { Bot, Flame, Gavel, Loader2, Plug, Puzzle, Scaling, Settings2, Snowflake, Sparkles, Swords, type LucideProps } from "lucide-react";
import { Bot, Flame, Gavel, Loader2, Plug, Puzzle, Scaling, Settings2, Snowflake, Sparkles, Swords, Users, type LucideProps } from "lucide-react";
import { api, asUiError, type ModuleSetting, type ModuleView, type UiError } from "@/lib/api";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
@@ -27,6 +27,7 @@ const TILES: Record<string, { icon: ComponentType<LucideProps>; from: string; to
gavel: { icon: Gavel, from: "from-yellow-500", to: "to-amber-700" },
sparkles: { icon: Sparkles, from: "from-fuchsia-500", to: "to-purple-700" },
swords: { icon: Swords, from: "from-rose-500", to: "to-red-800" },
races: { icon: Users, from: "from-cyan-500", to: "to-blue-800" },
};
const DEFAULT_TILE = { icon: Puzzle, from: "from-slate-500", to: "to-slate-700" };