summaryrefslogtreecommitdiff
path: root/nodejs/model/ship.ts
blob: bf40767817f2c9252bc6f30e1fe10dd1a980761a (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 { Cargo } from './cargo.ts';

export type Cooldown = {
	shipSymbol: string;
	totalSeconds: number;
	remainingSeconds: number;
};

export type Consummed = {
	amount: number;
	timestamp: Date;
};

export type Fuel = {
	capacity: number;
	consummed: Consummed;
	current: number;
};

export type Nav = {
	flightMode: string;
	route: Route;
	status: string;
	systemSymbol: string;
	waypointSymbol: string;
};

export type Registration = {
	factionSymbol: string;
	name: string;
	role: string;
};

export type Route = {
	arrival: Date;
	departureTime: Date;
	destination: RouteEndpoint;
	origin: RouteEndpoint;
};

export type RouteEndpoint = {
	type: string;
	symbol: string;
	systemSymbol: string;
	x: number;
	y: number;
};

export type Ship = {
	cargo: Cargo;
	cooldown: Cooldown;
	// crew
	// engine
	// frame
	fuel: Fuel;
	// modules
	// mounts
	nav: Nav;
	// reactor
	registration: Registration;
	symbol: string;
};