Files
leim-tools/models/Characters.ts
Alexis 67f5a270af Huge refactor for backend and client
This is barely functionnal, but at least it can display some data without crashing
Most other functionnalities other than displaying events are broken, and so are the relative date operations, they need to be fixed asap
2024-05-16 22:58:19 +02:00

32 lines
646 B
TypeScript

import type { RPGDate } from './Date'
export interface Character {
name: string
description?: string
birth?: RPGDate
death?: RPGDate
hiddenBirth?: boolean
hiddenDeath?: boolean
category?: CharacterCategory
secondaryCategories?: CharacterCategory[]
wiki?: string
}
export const characterCategories = [
'joueur',
'comte',
'scientifique',
'mage',
'professeur',
'criminel',
'étincelle',
'buse blanche',
'ecclésiastique',
'sentinelle'
] as const
export type CharacterCategory = (typeof characterCategories)[number]
export function isCharacter(object: any): object is Character {
return 'birth' in object
}