Feature choice UI rework, feature editor fixes, new character manage page UI with tabgroup and action config

This commit is contained in:
Clément Pons
2025-10-01 17:59:14 +02:00
parent eb0c33deae
commit 3113d8b0f3
8 changed files with 180 additions and 10102 deletions

12
types/character.d.ts vendored
View File

@@ -67,7 +67,11 @@ export type CharacterConfig = {
features: Record<FeatureID, Feature>;
enchantments: Record<string, EnchantementConfig>; //TODO
items: Record<string, ItemConfig>;
lists: Record<string, { id: string, config: Record<string, any>, values: Record<string, any> }>;
sickness: Record<string, { id: string, name: string, description: string, effect: FeatureID[] }>;
action: Record<string, { id: string, name: string, description: string, cost: number }>;
reaction: Record<string, { id: string, name: string, description: string, cost: number }>;
freeaction: Record<string, { id: string, name: string, description: string }>;
passive: Record<string, { id: string, name: string, description: string }>;
texts: Record<i18nID, Localized>;
};
export type EnchantementConfig = {
@@ -119,6 +123,7 @@ export type SpellConfig = {
elements: Array<SpellElement>;
effect: string; //TODO -> TextID
concentration: boolean;
range: 'personnal' | number;
tags?: string[];
};
export type RaceConfig = {
@@ -159,8 +164,7 @@ export type FeatureList = {
category: "list";
list: "spells" | "sickness" | "action" | "reaction" | "freeaction" | "passive";
action: "add" | "remove";
item: string | i18nID;
extra?: any;
item: string;
};
export type FeatureChoice = {
id: FeatureID;
@@ -175,7 +179,7 @@ export type FeatureChoice = {
export type FeatureItem = FeatureValue | FeatureList | FeatureChoice;
export type Feature = {
id: FeatureID;
description: i18nID;
description: string; //TODO -> TextID
effect: FeatureItem[];
};