UNPKG

@kayahr/ed-journal

Version:

Typescript library to read/watch the player journal of Frontier's game Elite Dangerous

111 lines (110 loc) 3.43 kB
import { type JournalEvent } from "../../JournalEvent.ts"; import type { BodyType } from "../types/BodyType.ts"; import type { ConflictFaction } from "../types/ConflictFaction.ts"; import type { ConflictProgress } from "../types/ConflictProgress.ts"; import type { ID } from "../types/ID.ts"; import type { PowerState } from "../types/PowerState.ts"; import { type StationService } from "../types/StationService.ts"; import type { StationType } from "../types/StationType.ts"; /** * Written at startup or when being resurrected at a station. */ export interface Location extends JournalEvent<"Location"> { StarSystem: string; SystemAddress?: ID; /** Star position as array (x, y, z) in light years. */ StarPos: [number, number, number]; Body: string; Body_Localised?: string; BodyID?: ID; BodyType: BodyType; ControllingPower?: string; DistFromStarLS?: number; Docked: boolean; Latitude?: number; Longitude?: number; StationName?: string; StationType?: StationType; MarketID?: ID; /** Star system's controlling faction. */ SystemFaction?: { Name: string; FactionState?: string; }; SystemAllegiance: string; SystemEconomy: string; SystemEconomy_Localised?: string; SystemSecondEconomy?: string; SystemSecondEconomy_Localised?: string; SystemGovernment: string; SystemGovernment_Localised?: string; SystemSecurity: string; SystemSecurity_Localised?: string; Population?: number; Wanted?: boolean; /** Info on local minor factions. */ Factions?: Array<{ Allegiance: string; FactionState: string; Government: string; Influence: number; Name: string; PendingStates?: Array<{ State: string; Trend: number; }>; RecoveringStates?: Array<{ State: string; Trend: number; }>; ActiveStates?: Array<{ State: string; }>; Happiness?: string; Happiness_Localised?: string; MyReputation?: number; SquadronFaction?: boolean; }>; /** Info on local conflicts. */ Conflicts?: Array<{ WarType: string; Status: string; Faction1: ConflictFaction; Faction2: ConflictFaction; }>; /** Names of any powers contesting the system, or the name of the controlling power. */ Powers?: string[]; /** The system's powerplay state. */ PowerplayState?: PowerState; PowerplayStateControlProgress?: number; PowerplayStateReinforcement?: number; PowerplayStateUndermining?: number; PowerplayConflictProgress?: ConflictProgress[]; ThargoidWar?: { CurrentState: string; NextStateSuccess: string; NextStateFailure: string; SuccessStateReached: boolean; WarProgress: number; RemainingPorts: number; }; StationFaction?: { Name: string; FactionState?: string; }; StationGovernment?: string; StationGovernment_Localised?: string; StationAllegiance?: string; StationServices?: StationService[]; StationEconomies?: Array<{ Name: string; Name_Localised: string; Proportion: number; }>; Taxi?: boolean; Multicrew?: boolean; InSRV?: boolean; OnFoot?: boolean; StationEconomy?: string; StationEconomy_Localised?: string; }