mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
chore: adjusted to new version of API vehicles data
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { Status, VehiclesData } from './common';
|
||||
import { Status, VehicleData } from './common';
|
||||
|
||||
export enum APIDataStatus {
|
||||
OK = 'OK',
|
||||
@@ -320,7 +320,7 @@ export namespace API {
|
||||
}
|
||||
|
||||
export namespace Vehicles {
|
||||
export type Response = VehiclesData;
|
||||
export type Response = VehicleData[];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+16
-10
@@ -191,22 +191,28 @@ export interface CheckpointTrain {
|
||||
}
|
||||
|
||||
// Vehicles Data
|
||||
export interface VehiclesData {
|
||||
simulatorVersion: string;
|
||||
|
||||
vehicleList: any[][];
|
||||
|
||||
vehicleProps: VehicleProps[];
|
||||
export interface VehicleData {
|
||||
id: number;
|
||||
name: string;
|
||||
type: string;
|
||||
cabinName: string | null;
|
||||
restrictions: Record<string, any> | null;
|
||||
vehicleGroupsId: number;
|
||||
group: VehiclesGroup;
|
||||
}
|
||||
|
||||
export interface VehicleProps {
|
||||
type: string;
|
||||
export interface VehiclesGroup {
|
||||
id: number;
|
||||
name: string;
|
||||
speed: number;
|
||||
length: number;
|
||||
weight: number;
|
||||
cargoTypes?: VehicleCargo[];
|
||||
coldStart?: boolean;
|
||||
doubleManned?: boolean;
|
||||
cargoTypes: VehicleCargo[] | null;
|
||||
locoProps: {
|
||||
coldStart: boolean;
|
||||
doubleManned: boolean;
|
||||
} | null;
|
||||
}
|
||||
|
||||
export interface VehicleCargo {
|
||||
|
||||
Reference in New Issue
Block a user