This commit is contained in:
2025-12-08 18:50:51 +01:00
20 changed files with 1499 additions and 311 deletions

View File

@@ -51,7 +51,7 @@ export const characterTable = table("character", {
people: text().notNull(),
level: int().notNull().default(1),
variables: text({ mode: 'json' }).notNull().default('{"health": 0,"mana": 0,"spells": [],"items": [],"exhaustion": 0,"sickness": [],"poisons": []}'),
aspect: int(),
aspect: text().notNull(),
public_notes: text(),
private_notes: text(),

View File

@@ -23,7 +23,7 @@ definePageMeta({
const job = ref<string>('');
const payload = reactive<Record<string, any>>({
data: JSON.stringify({ username: "Peaceultime", id: 1, timestamp: Date.now() }),
data: JSON.stringify({ username: "Peaceultime", id: 1, userId: 1, timestamp: Date.now() }),
to: 'clem31470@gmail.com',
});
const data = ref(), status = ref<'idle' | 'pending' | 'success' | 'error'>('idle'), success = ref(false), error = ref<Error | null>();

View File

@@ -30,7 +30,7 @@ export type Character = {
name: string; //Free text
people?: string; //People ID
level: number;
aspect?: number;
aspect?: string; //Aspect ID
notes?: { public?: string, private?: string }; //Free text
training: Record<MainStat, Partial<Record<TrainingLevel, number>>>;
@@ -68,8 +68,8 @@ type ItemState = {
export type CharacterConfig = {
peoples: Record<string, RaceConfig>;
training: Record<MainStat, Record<TrainingLevel, FeatureID[]>>;
spells: SpellConfig[];
aspects: AspectConfig[];
spells: Record<string, SpellConfig>;
aspects: Record<string, AspectConfig>;
features: Record<FeatureID, Feature>;
enchantments: Record<string, EnchantementConfig>; //TODO
items: Record<string, ItemConfig>;
@@ -142,6 +142,7 @@ export type RaceConfig = {
options: Record<Level, FeatureID[]>;
};
export type AspectConfig = {
id: string;
name: string;
description: string; //TODO -> TextID
stat: MainStat | 'special';