Poprawki bugów; cleanup i restrukturyzacja kodu

This commit is contained in:
2021-11-12 23:08:25 +01:00
parent c8b9734506
commit 8e9da4c498
7 changed files with 1113 additions and 970 deletions
+63
View File
@@ -0,0 +1,63 @@
export interface IStore {
chosenCar: ICarWagon | null;
chosenLoco: ILocomotive | null;
chosenCargo: ICargo | null;
showSupporter: boolean;
imageLoading: boolean;
chosenLocoPower: string;
chosenCarUseType: string;
stockList: IStock[];
cargoOptions: any[][];
}
export interface IVehicleData {
[key: string]: (string | boolean)[][];
}
export interface ILocomotive {
type: string;
power: string;
constructionType: string;
cabinType: string;
maxSpeed: number;
supportersOnly: boolean;
imageSrc: string;
mass: number;
length: number;
}
export interface ICarWagon {
//"203V_PKPC_Fll_01","203V",true,false,"100",img
type: string;
useType: string;
constructionType: string;
loadable: boolean;
supportersOnly: boolean;
maxSpeed: number;
imageSrc: string;
mass: number;
length: number;
cargoList: { id: string; totalMass: number }[];
}
export interface ICargo {
id: string;
totalMass: number;
}
export interface IStock {
useType: string;
type: string;
length: number;
mass: number;
maxSpeed: number;
cargo?: { id: string; totalMass: number };
isLoco: boolean;
count: number;
imgSrc: string;
}