mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-04 20:18:12 +00:00
Poprawki
This commit is contained in:
@@ -352,7 +352,10 @@ export default defineComponent({
|
|||||||
if (this.stockHasWarnings())
|
if (this.stockHasWarnings())
|
||||||
return alert('Jazda tym pociągiem jest niezgodna z regulaminem symulatora! Zmień parametry zestawienia!');
|
return alert('Jazda tym pociągiem jest niezgodna z regulaminem symulatora! Zmień parametry zestawienia!');
|
||||||
|
|
||||||
const fileName = prompt('Nazwij plik:', `${this.store.chosenRealStockName || this.store.stockList[0].type}`);
|
const fileName = prompt(
|
||||||
|
'Nazwij plik, a następnie pobierz do folderu Presets (Dokumenty/TTSK/TrainDriver2):',
|
||||||
|
`${this.store.chosenRealStockName || this.store.stockList[0].type}`
|
||||||
|
);
|
||||||
|
|
||||||
if (!fileName) return;
|
if (!fileName) return;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,39 @@
|
|||||||
import { computed } from 'vue';
|
|
||||||
import { EVehicleUseType } from '../enums/EVehicleUseType';
|
import { EVehicleUseType } from '../enums/EVehicleUseType';
|
||||||
import { ICarWagon, ILocomotive, IStore, IVehicleData } from '../types';
|
import { ICarWagon, ILocomotive, IStore, IVehicleData } from '../types';
|
||||||
|
|
||||||
import vehicleDataJSON from '../data/vehicleData.json';
|
import vehicleDataJSON from '../data/vehicleData.json';
|
||||||
import vehiclePropsJSON from '../data/vehicleProps.json';
|
import vehiclePropsJSON from '../data/vehicleProps.json';
|
||||||
|
|
||||||
|
// rodzaj: [tMaxPas, vMaxPas, tMaxTow, vMaxTow] | SM42: [tMax, vMax, ...]
|
||||||
|
const maxAllowedSpeedTable = {
|
||||||
|
EU07: [
|
||||||
|
[650, 125],
|
||||||
|
[2000, 70],
|
||||||
|
],
|
||||||
|
EP07: [
|
||||||
|
[650, 125],
|
||||||
|
[0, 0],
|
||||||
|
],
|
||||||
|
EP08: [
|
||||||
|
[650, 140],
|
||||||
|
[0, 0],
|
||||||
|
],
|
||||||
|
ET41: [
|
||||||
|
[700, 125],
|
||||||
|
[4000, 70],
|
||||||
|
],
|
||||||
|
SM42: [
|
||||||
|
[95, 90],
|
||||||
|
[200, 80],
|
||||||
|
[300, 70],
|
||||||
|
[450, 60],
|
||||||
|
[750, 50],
|
||||||
|
[1130, 40],
|
||||||
|
[1720, 30],
|
||||||
|
[2400, 20],
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
export function isLocomotive(vehicle: ILocomotive | ICarWagon): vehicle is ILocomotive {
|
export function isLocomotive(vehicle: ILocomotive | ICarWagon): vehicle is ILocomotive {
|
||||||
return (vehicle as ILocomotive).power !== undefined;
|
return (vehicle as ILocomotive).power !== undefined;
|
||||||
}
|
}
|
||||||
@@ -172,6 +201,19 @@ export function chosenRealStock(state: IStore) {
|
|||||||
return realStockObj;
|
return realStockObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// export function maxAllowedSpeed(state: IStore) {
|
||||||
|
// const headLocoType = state.stockList[0]?.isLoco ? state.stockList[0].type : undefined;
|
||||||
|
|
||||||
|
// if (!headLocoType) return 0;
|
||||||
|
|
||||||
|
// const isPassenger = isTrainPassenger(state);
|
||||||
|
// const stockMass = totalMass(state);
|
||||||
|
|
||||||
|
// // const maxSpeed = maxAllowedSpeedTable[headLocoType];
|
||||||
|
|
||||||
|
// // if()
|
||||||
|
// }
|
||||||
|
|
||||||
// export function maxAllowedSpeed(state: IStore) {
|
// export function maxAllowedSpeed(state: IStore) {
|
||||||
// if (state.stockList.length < 1) return -1;
|
// if (state.stockList.length < 1) return -1;
|
||||||
// if (!state.stockList[0].isLoco) return -1;
|
// if (!state.stockList[0].isLoco) return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user