Files
Kingdom-Cheat-Deliverance-2/src/types.ts
T
Homer 4577fae207 Build overlay frontend: tabs, search, param forms, copy-to-clipboard
Quick Cheats, full command DB with category/source filters, item/perk/
buff/skill databases with fill-in parameters and per-flavor command
variants, settings tab with hotkey recorder, opacity, flavor, autostart.
Dark HUD theme on a transparent frameless window.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 09:19:23 +02:00

70 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export type Source = "cheatmod" | "devmode";
export interface CommandArg {
name: string;
required: boolean;
type: string; // "string" | "number" | "boolean"
desc: string;
}
export interface CommandExample {
caption: string;
command: string;
}
/** A command from the Cheat mod docs (built as `name arg:value ...`). */
export interface ModCommand {
name: string;
desc: string;
args: CommandArg[];
examples: CommandExample[];
category: string;
source: "cheatmod";
}
export interface TemplateParam {
name: string;
type: "number" | "string" | "select";
required?: boolean;
desc?: string;
default?: string | number;
options?: string[];
}
/** A hand-curated vanilla command (built from a `{placeholder}` template). */
export interface VanillaCommand {
name: string;
template: string;
desc: string;
params: TemplateParam[];
category: string;
source: "devmode";
}
export type AnyCommand = ModCommand | VanillaCommand;
export interface DbEntry {
id: string;
name: string;
desc: string;
params?: string; // buffs only: effect formula
}
export interface QuickEntry {
label: string;
desc: string;
params: TemplateParam[];
variants: Partial<Record<Source, string>>;
}
export interface QuickGroup {
group: string;
entries: QuickEntry[];
}
export interface Settings {
flavor: Source;
opacity: number; // 0.51
startHidden: boolean;
}