mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 19:48:11 +00:00
refactor: adjusted to new API format
This commit is contained in:
+36
-26
@@ -21,32 +21,7 @@ export interface ICargo {
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export interface IVehiclesData {
|
||||
simulatorVersion: string;
|
||||
|
||||
generator: {
|
||||
cargo: {
|
||||
[key: string]: string[];
|
||||
};
|
||||
};
|
||||
|
||||
vehicleList: any[][];
|
||||
|
||||
vehicleProps: IVehicleProps[];
|
||||
|
||||
vehicleLocales: {
|
||||
pl: {
|
||||
cargo: Record<string, string>;
|
||||
usage: Record<string, string>;
|
||||
};
|
||||
en: {
|
||||
cargo: Record<string, string>;
|
||||
usage: Record<string, string>;
|
||||
};
|
||||
};
|
||||
|
||||
realCompositions: Record<string, string>;
|
||||
}
|
||||
export type IVehiclesAPIResponse = IVehicleData[];
|
||||
|
||||
export interface ILocomotive {
|
||||
type: string;
|
||||
@@ -88,3 +63,38 @@ export interface IRealComposition {
|
||||
number: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IVehicleData {
|
||||
id: number;
|
||||
name: string;
|
||||
type: string;
|
||||
cabinName: string | null;
|
||||
restrictions: IVehicleRestrictions | null;
|
||||
vehicleGroupsId: number;
|
||||
group: IVehicleGroup;
|
||||
}
|
||||
|
||||
export interface IVehicleRestrictions {
|
||||
sponsorOnly: number | null;
|
||||
teamOnly: boolean | null;
|
||||
}
|
||||
|
||||
export interface IVehicleGroup {
|
||||
id: number;
|
||||
name: string;
|
||||
speed: number;
|
||||
length: number;
|
||||
weight: number;
|
||||
cargoTypes: IVehicleCargoType[] | null;
|
||||
locoProps: IVehicleLocoProps | null;
|
||||
}
|
||||
|
||||
export interface IVehicleCargoType {
|
||||
id: string;
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export interface IVehicleLocoProps {
|
||||
coldStart: boolean;
|
||||
doubleManned: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user