@kayahr/ed-journal
Version:
Typescript library to read/watch the player journal of Frontier's game Elite Dangerous
92 lines (91 loc) • 2.9 kB
TypeScript
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";
/**
* Written when jumping from one star to another.
*/
export interface FSDJump extends JournalEvent<"FSDJump"> {
/** Name of destination star system. */
StarSystem: string;
SystemAddress?: ID;
/** Star position as array (x, y, z) in light years. */
StarPos: [number, number, number];
Body?: string;
BodyID?: ID;
BodyType?: BodyType;
ControllingPower?: string;
/** Distance jumped. */
JumpDist: number;
FuelUsed: number;
FuelLevel: number;
/** Whether FSD boost was used. */
BoostUsed?: number;
/** 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 for the local minor factions. */
Factions?: Array<{
Name: string;
FactionState: string;
Government: string;
Influence: number;
Allegiance: string;
Happiness?: string;
Happiness_Localised?: string;
MyReputation?: number;
PendingStates?: Array<{
State: string;
Trend: number;
}>;
RecoveringStates?: Array<{
State: string;
Trend: number;
}>;
ActiveStates?: Array<{
State: string;
}>;
SquadronFaction?: boolean;
}>;
/** Info about local conflicts (if any) */
Conflicts?: Array<{
WarType: string;
Status: string;
Faction1: ConflictFaction;
Faction2: ConflictFaction;
}>;
/** If starting in a system affected by the thargoid war. */
ThargoidWar?: {
CurrentState: string;
NextStateSuccess: string;
NextStateFailure: string;
SuccessStateReached: boolean;
WarProgress: number;
RemainingPorts: number;
};
/** 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[];
Taxi?: boolean;
Multicrew?: boolean;
}