Custom races off: count the characters kept out, delete their companion bots

A client without the races patch crashes on a unit of race 12+, so the server now keeps
those characters out while custom races are off. The Custom Races card shows how many
player characters and bots that are (active realm, read only while the database runs) and
offers botcmd purgecustomraces for the companion bots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Opus 5.5 committed 2026-11-16 00:36:18 +05:00
1 parent 2fd42f2acd
commit f9839ba369
13 files changed
+121 -1

No files matched your search

+3
View File
@@ -58,6 +58,7 @@ export interface StatusView {
}
export type RealmMode = "coa" | "wildcard" | "reborn";
export interface CustomRaceCharacters { players: number; companionBots: number; squidBots: number }
export interface AddonView { id: string; name: string; description: Record<string, string>; author: string; license: string; needs: string | null; repo: string; size: number; installed: boolean; updateAvailable: boolean; foreignFolders: string[]; bundled?: string | null }
export interface RestartSchedule { enabled: boolean; time: string; warningMinutes: number }
export interface RestartScheduleView { schedule: RestartSchedule; supported: boolean }
@@ -493,6 +494,8 @@ export const api = {
realmProfiles: (id: string) => invoke<RealmProfiles>("realm_profiles", { id }),
realmSelect: (id: string, mode: RealmMode, restart: boolean) => invoke<RealmProfiles>("realm_select", { id, mode, restart }),
realmSimultaneous: (id: string, enabled: boolean) => invoke<RealmProfiles>("realm_simultaneous", { id, enabled }),
customRaceCharacters: (id: string) => invoke<CustomRaceCharacters | null>("custom_race_characters", { id }),
purgeCustomRaceBots: (id: string) => invoke<number>("purge_custom_race_bots", { id }),
addonsList: (id: string) => invoke<AddonView[]>("addons_list", { id }),
addonsInstall: (id: string, addon: string) => invoke<AddonView[]>("addons_install", { id, addon }),
addonsRemove: (id: string, addon: string) => invoke<AddonView[]>("addons_remove", { id, addon }),