blob: 8d0b32870a5a9c9d9a6f079223e34ea1b6ca7074 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
import type { GameTime } from '@hollowdark/time/gameTime'
import type { PersonId, PlaceId, WorldEventId, WorldId } from '@hollowdark/engine/entities/base'
import type { ScheduledEvent } from '@hollowdark/engine/entities/scheduled-event'
/**
* Macro economic state tracked at the world scale — inflation, employment,
* market index, recession depth. Individual characters' economics derive
* against this background.
*/
export interface MacroEconomicState {
readonly inflationAnnual: number
readonly employmentRate: number
readonly marketIndex: number
readonly recessionDepth: number
}
export interface RegionPoliticalState {
readonly stability: number
readonly currentRegime: string
readonly tensions: readonly string[]
}
export interface WorldSettings {
readonly contentVersionAtCreation: string
readonly schemaVersion: number
}
export interface CrisisState {
readonly active: boolean
readonly crisisEventId: string | null
readonly sceneIndex: number
readonly startedAt: GameTime | null
}
/**
* The world container. One continuous world per player. Time in this world
* never resets once created; successive player characters advance it forward.
* `createdAt` is a real-world ISO timestamp, not a `GameTime`.
*/
export interface World {
readonly id: WorldId
readonly seed: string
readonly createdAt: string
readonly currentGameTime: GameTime
readonly currentPlayerCharacterId: PersonId | null
readonly playedCharacterIds: readonly PersonId[]
readonly tierOneIds: readonly PersonId[]
readonly tierTwoIds: readonly PersonId[]
readonly economy: MacroEconomicState
readonly politicsByRegion: ReadonlyMap<PlaceId, RegionPoliticalState>
readonly activeEventIds: readonly WorldEventId[]
readonly scheduledEvents: readonly ScheduledEvent[]
readonly crisisState: CrisisState
readonly settings: WorldSettings
}
|