Kopiowanie składu do schowka; możliwość losowania wagonów pasażerskich

This commit is contained in:
2021-11-22 17:45:16 +01:00
parent 2d65c90e94
commit d46362a751
11 changed files with 190 additions and 69 deletions
+7
View File
@@ -20,12 +20,19 @@ export const Store: IStore = reactive({
stockList: [] as IStock[],
cargoOptions: [] as any[][],
swapVehicles: false,
chosenStockListIndex: -1,
// locoOptions: [] as ILocomotive[],
// carOptions: [] as ICarWagon[],
vehiclePreviewSrc: ""
})
export function isLocomotive(vehicle: ILocomotive | ICarWagon): vehicle is ILocomotive {
return (vehicle as ILocomotive).power !== undefined;
}
export const locoDataList = computed(() => Object.keys(vehicleDataJSON).reduce(
(acc, vehicleTypeKey) => {