|
| 1 | +export type Department = 'medical' | 'engineering' | 'agriculture' | 'science' | 'administration' | 'psychology' | 'governance'; |
| 2 | + |
| 3 | +export interface LifeEvent { |
| 4 | + year: number; |
| 5 | + event: string; |
| 6 | + source: Department | 'kernel' | 'commander'; |
| 7 | +} |
| 8 | + |
| 9 | +export interface ColonistCore { |
| 10 | + id: string; |
| 11 | + name: string; |
| 12 | + birthYear: number; |
| 13 | + marsborn: boolean; |
| 14 | + department: Department; |
| 15 | + role: string; |
| 16 | +} |
| 17 | + |
| 18 | +export interface ColonistHealth { |
| 19 | + alive: boolean; |
| 20 | + deathYear?: number; |
| 21 | + deathCause?: string; |
| 22 | + boneDensityPct: number; |
| 23 | + cumulativeRadiationMsv: number; |
| 24 | + psychScore: number; |
| 25 | + conditions: string[]; |
| 26 | +} |
| 27 | + |
| 28 | +export interface ColonistCareer { |
| 29 | + specialization: string; |
| 30 | + yearsExperience: number; |
| 31 | + rank: 'junior' | 'senior' | 'lead' | 'chief'; |
| 32 | + achievements: string[]; |
| 33 | + currentProject?: string; |
| 34 | +} |
| 35 | + |
| 36 | +export interface ColonistSocial { |
| 37 | + partnerId?: string; |
| 38 | + childrenIds: string[]; |
| 39 | + friendIds: string[]; |
| 40 | + earthContacts: number; |
| 41 | +} |
| 42 | + |
| 43 | +export interface ColonistNarrative { |
| 44 | + lifeEvents: LifeEvent[]; |
| 45 | + featured: boolean; |
| 46 | +} |
| 47 | + |
| 48 | +export interface Colonist { |
| 49 | + core: ColonistCore; |
| 50 | + health: ColonistHealth; |
| 51 | + career: ColonistCareer; |
| 52 | + social: ColonistSocial; |
| 53 | + narrative: ColonistNarrative; |
| 54 | +} |
| 55 | + |
| 56 | +export interface ColonySystems { |
| 57 | + population: number; |
| 58 | + powerKw: number; |
| 59 | + foodMonthsReserve: number; |
| 60 | + waterLitersPerDay: number; |
| 61 | + pressurizedVolumeM3: number; |
| 62 | + lifeSupportCapacity: number; |
| 63 | + infrastructureModules: number; |
| 64 | + scienceOutput: number; |
| 65 | + morale: number; |
| 66 | +} |
| 67 | + |
| 68 | +export interface ColonyPolitics { |
| 69 | + earthDependencyPct: number; |
| 70 | + governanceStatus: 'earth-governed' | 'commonwealth' | 'independent'; |
| 71 | + independencePressure: number; |
| 72 | +} |
| 73 | + |
| 74 | +export interface SimulationMetadata { |
| 75 | + simulationId: string; |
| 76 | + leaderId: string; |
| 77 | + seed: number; |
| 78 | + startYear: number; |
| 79 | + currentYear: number; |
| 80 | + currentTurn: number; |
| 81 | +} |
| 82 | + |
| 83 | +export interface TurnEvent { |
| 84 | + turn: number; |
| 85 | + year: number; |
| 86 | + type: 'crisis' | 'decision' | 'birth' | 'death' | 'promotion' | 'relationship' | 'tool_forge' | 'system'; |
| 87 | + description: string; |
| 88 | + colonistId?: string; |
| 89 | + data?: Record<string, unknown>; |
| 90 | +} |
| 91 | + |
| 92 | +export interface SimulationState { |
| 93 | + metadata: SimulationMetadata; |
| 94 | + colony: ColonySystems; |
| 95 | + colonists: Colonist[]; |
| 96 | + politics: ColonyPolitics; |
| 97 | + eventLog: TurnEvent[]; |
| 98 | +} |
0 commit comments