@kayahr/ed-journal
Version:
Typescript library to read/watch the player journal of Frontier's game Elite Dangerous
32 lines (31 loc) • 1.15 kB
TypeScript
import type { JournalEvent } from "../../JournalEvent.ts";
import type { ID } from "../types/ID.ts";
/** The vessel for which the cargo event is written. */
export type CargoVessel = "Ship" | "SRV";
/**
* Written slightly later in startup after missions are initialized so cargo coming from an abandoned delivery mission
* can be detected.
*
* The first Cargo event in the file will contain the full inventory.
*
* A simple event (with no Inventory property) is written to the main journal file when the cargo file is updated.
*/
export interface Cargo extends JournalEvent<"Cargo"> {
/** Ship or SRV */
Vessel?: CargoVessel;
/** The total number of items. */
Count?: number;
/** Array of cargo. Not set when Cargo.json file was written instead. */
Inventory?: Array<{
/** The item name. */
Name: string;
/** Optional localized item name. */
Name_Localised?: string;
/** The number of items. */
Count: number;
/** How many of the items are stolen. */
Stolen?: number;
/** ID of the mission the item belongs to. */
MissionID?: ID;
}>;
}