mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 11:45:34 +00:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9bb0bcb735 | |||
| 56dc42b58e | |||
| 3a17f7485f | |||
| 39b58d6e7c | |||
| bd70e0f071 | |||
| 32594e2f67 | |||
| 05dbf33b4f | |||
| 4022d2ea2f | |||
| 85fec2f348 | |||
| 85f91a59cd | |||
| 857c176a38 | |||
| 7d0070820c | |||
| bd1de41764 | |||
| 0799bfd838 | |||
| 730275ea7c | |||
| a0c578b31b | |||
| d21aec63d0 | |||
| 80c5194735 | |||
| 93bbedf189 | |||
| b35293575a | |||
| 633f7f4c26 | |||
| b68e9da715 | |||
| 05ae446af7 | |||
| 09e5c53558 | |||
| fe70b19f2a | |||
| 32fbf51943 | |||
| 39f2688611 | |||
| 1090249e08 | |||
| c38debb458 | |||
| ee552d65ec |
+1
-1
@@ -2,5 +2,5 @@
|
|||||||
"semi": true,
|
"semi": true,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "es5",
|
"trailingComma": "es5",
|
||||||
"printWidth": 100
|
"printWidth": 150
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-17
@@ -1,5 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
@@ -22,34 +23,34 @@
|
|||||||
<meta property="og:url" content="https://pojazdownik-td2.web.app/" />
|
<meta property="og:url" content="https://pojazdownik-td2.web.app/" />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:title" content="Pojazdownik" />
|
<meta property="og:title" content="Pojazdownik" />
|
||||||
<meta
|
<meta property="og:description" content="Edytor składów online dla symulatora Train Driver 2" />
|
||||||
property="og:description"
|
<meta property="og:image"
|
||||||
content="Edytor składów online dla symulatora Train Driver 2"
|
content="https://raw.githubusercontent.com/Spythere/api/refs/heads/main/thumbnails/pojazdownik-banner.png" />
|
||||||
/>
|
|
||||||
<meta
|
|
||||||
property="og:image"
|
|
||||||
content="https://raw.githubusercontent.com/Spythere/api/refs/heads/main/thumbnails/pojazdownik-banner.png"
|
|
||||||
/>
|
|
||||||
<meta property="og:image:width" content="1200" />
|
<meta property="og:image:width" content="1200" />
|
||||||
<meta property="og:image:height" content="630" />
|
<meta property="og:image:height" content="630" />
|
||||||
<meta property="og:site_name" content="Pojazdownik" />
|
<meta property="og:site_name" content="Pojazdownik" />
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:title" content="Pojazdownik" />
|
<meta name="twitter:title" content="Pojazdownik" />
|
||||||
<meta
|
<meta name="twitter:description" content="Edytor składów online dla symulatora Train Driver 2" />
|
||||||
name="twitter:description"
|
<meta name="twitter:image"
|
||||||
content="Edytor składów online dla symulatora Train Driver 2"
|
content="https://raw.githubusercontent.com/Spythere/api/refs/heads/main/thumbnails/pojazdownik-banner.png" />
|
||||||
/>
|
|
||||||
<meta
|
<!-- Preload -->
|
||||||
name="twitter:image"
|
<link rel="preload" href="/fonts/Lato-Bold.woff2" as="font" type="font/woff2" crossorigin />
|
||||||
content="https://raw.githubusercontent.com/Spythere/api/refs/heads/main/thumbnails/pojazdownik-banner.png"
|
<link rel="preload" href="/fonts/Lato-Regular.woff2" as="font" type="font/woff2" crossorigin />
|
||||||
/>
|
|
||||||
|
<link rel="preload" as="image" href="/logo-pl.svg" />
|
||||||
|
<link rel="preload" as="image" href="/logo-en.svg" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
<strong> We're sorry but Pojazdownik doesn't work properly without JavaScript enabled. Please enable it to continue. </strong>
|
<strong> We're sorry but Pojazdownik doesn't work properly without JavaScript enabled. Please enable it to continue.
|
||||||
|
</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
+15
-15
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pojazdownik",
|
"name": "pojazdownik",
|
||||||
"version": "1.9.1",
|
"version": "1.9.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -13,27 +13,27 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"lucide-vue-next": "^0.487.0",
|
"lucide-vue-next": "^0.552.0",
|
||||||
"pinia": "^2.0.17",
|
"pinia": "^3.0.3",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.0.3",
|
||||||
"vue": "^3.2.37",
|
"vue": "^3.2.37",
|
||||||
"vue-i18n": "9.11.0",
|
"vue-i18n": "11.1.12",
|
||||||
"vue-router": "4"
|
"vue-router": "4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rushstack/eslint-patch": "^1.3.3",
|
"@rushstack/eslint-patch": "^1.3.3",
|
||||||
"@types/node": "^22.13.9",
|
"@types/node": "^24.10.0",
|
||||||
"@vite-pwa/assets-generator": "^0.2.3",
|
"@vite-pwa/assets-generator": "^1.0.2",
|
||||||
"@vitejs/plugin-vue": "^5.0.3",
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
"@vue/eslint-config-prettier": "^9.0.0",
|
"@vue/eslint-config-prettier": "^10.2.0",
|
||||||
"@vue/eslint-config-typescript": "^12.0.0",
|
"@vue/eslint-config-typescript": "^14.6.0",
|
||||||
"@vue/tsconfig": "^0.5.1",
|
"@vue/tsconfig": "^0.8.1",
|
||||||
"eslint": "^8.49.0",
|
"eslint": "^9.39.1",
|
||||||
"eslint-plugin-vue": "^9.17.0",
|
"eslint-plugin-vue": "^10.5.1",
|
||||||
"sass": "^1.59.3",
|
"sass": "^1.59.3",
|
||||||
"typescript": "^5.0.2",
|
"typescript": "^5.0.2",
|
||||||
"vite": "^5.0.12",
|
"vite": "^7.1.12",
|
||||||
"vite-plugin-pwa": "^0.17.5",
|
"vite-plugin-pwa": "^1.1.0",
|
||||||
"vue-tsc": "^2.2.8"
|
"vue-tsc": "^3.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+9
-4
@@ -11,6 +11,14 @@ import { useStore } from './store';
|
|||||||
import ImageFullscreenPreview from './components/utils/ImageFullscreenPreview.vue';
|
import ImageFullscreenPreview from './components/utils/ImageFullscreenPreview.vue';
|
||||||
import AppContainerView from './views/AppContainerView.vue';
|
import AppContainerView from './views/AppContainerView.vue';
|
||||||
import AppModals from './components/app/AppModals.vue';
|
import AppModals from './components/app/AppModals.vue';
|
||||||
|
import { registerSW } from 'virtual:pwa-register';
|
||||||
|
|
||||||
|
registerSW({
|
||||||
|
immediate: true,
|
||||||
|
onNeedRefresh() {
|
||||||
|
console.log('Needs refresh!');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { ImageFullscreenPreview, AppContainerView, AppModals },
|
components: { ImageFullscreenPreview, AppContainerView, AppModals },
|
||||||
@@ -49,10 +57,7 @@ export default defineComponent({
|
|||||||
try {
|
try {
|
||||||
this.store.storageStockData = JSON.parse(savedData);
|
this.store.storageStockData = JSON.parse(savedData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(
|
console.error('Wystąpił błąd podczas przetwarzania danych o składach z localStorage!', error);
|
||||||
'Wystąpił błąd podczas przetwarzania danych o składach z localStorage!',
|
|
||||||
error
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,7 +9,13 @@
|
|||||||
</i18n-t>
|
</i18n-t>
|
||||||
|
|
||||||
<div class="text--grayed" v-if="store.vehiclesData">
|
<div class="text--grayed" v-if="store.vehiclesData">
|
||||||
{{ $t('footer.version-check', { version: store.compatibleSimulatorVersion }) }}
|
{{
|
||||||
|
$t('footer.vehicles-count', {
|
||||||
|
all: vehiclesCounters.all,
|
||||||
|
units: vehiclesCounters.units,
|
||||||
|
cars: vehiclesCounters.cars,
|
||||||
|
})
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -33,6 +39,27 @@ export default defineComponent({
|
|||||||
store: useStore(),
|
store: useStore(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
vehiclesCounters() {
|
||||||
|
let counters = {
|
||||||
|
all: 0,
|
||||||
|
cars: 0,
|
||||||
|
units: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!this.store.vehiclesData) return counters;
|
||||||
|
|
||||||
|
this.store.vehiclesData?.forEach((v) => {
|
||||||
|
counters.all += 1;
|
||||||
|
|
||||||
|
if (v.group.locoProps !== null) counters.units += 1;
|
||||||
|
else counters.cars += 1;
|
||||||
|
});
|
||||||
|
|
||||||
|
return counters;
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,7 @@
|
|||||||
<div class="stock-specs">
|
<div class="stock-specs">
|
||||||
<div v-if="store.chosenStorageStockName || chosenRealComposition">
|
<div v-if="store.chosenStorageStockName || chosenRealComposition">
|
||||||
<b v-if="store.chosenStorageStockName">
|
<b v-if="store.chosenStorageStockName">
|
||||||
<span
|
<span class="text--accent" :title="store.chosenStorageStockName.length > 41 ? store.chosenStorageStockName : ''">
|
||||||
class="text--accent"
|
|
||||||
:title="store.chosenStorageStockName.length > 41 ? store.chosenStorageStockName : ''"
|
|
||||||
>
|
|
||||||
<BookmarkCheck :size="19" />
|
<BookmarkCheck :size="19" />
|
||||||
{{ store.chosenStorageStockName.slice(0, 40) }}
|
{{ store.chosenStorageStockName.slice(0, 40) }}
|
||||||
{{ store.chosenStorageStockName.length > 41 ? '...' : '' }}
|
{{ store.chosenStorageStockName.length > 41 ? '...' : '' }}
|
||||||
@@ -16,11 +13,7 @@
|
|||||||
|
|
||||||
<b class="real-stock-info" v-if="chosenRealComposition">
|
<b class="real-stock-info" v-if="chosenRealComposition">
|
||||||
<span class="text--accent">
|
<span class="text--accent">
|
||||||
<img
|
<img class="real-stock-icon" :src="getIconURL(chosenRealComposition.type)" :alt="chosenRealComposition.type" />
|
||||||
class="real-stock-icon"
|
|
||||||
:src="getIconURL(chosenRealComposition.type)"
|
|
||||||
:alt="chosenRealComposition.type"
|
|
||||||
/>
|
|
||||||
{{ chosenRealComposition.number }} {{ chosenRealComposition.name }}
|
{{ chosenRealComposition.number }} {{ chosenRealComposition.name }}
|
||||||
</span>
|
</span>
|
||||||
</b>
|
</b>
|
||||||
@@ -30,14 +23,11 @@
|
|||||||
{{ $t('stocklist.mass') }}
|
{{ $t('stocklist.mass') }}
|
||||||
<span class="text--accent">{{ (store.totalWeight / 1000).toFixed(1) }}t</span>
|
<span class="text--accent">{{ (store.totalWeight / 1000).toFixed(1) }}t</span>
|
||||||
({{ $t('stocklist.mass-accepted') }}:
|
({{ $t('stocklist.mass-accepted') }}:
|
||||||
<span class="text--accent">{{
|
<span class="text--accent">{{ store.acceptableWeight ? `${~~(store.acceptableWeight / 1000)}t` : '-' }}</span
|
||||||
store.acceptableWeight ? `${~~(store.acceptableWeight / 1000)}t` : '-'
|
|
||||||
}}</span
|
|
||||||
>) - {{ $t('stocklist.length') }}:
|
>) - {{ $t('stocklist.length') }}:
|
||||||
<span class="text--accent">{{ store.totalLength }}m</span>
|
<span class="text--accent">{{ store.totalLength }}m</span>
|
||||||
- {{ $t('stocklist.vmax') }}
|
- {{ $t('stocklist.vmax') }} <span tabindex="0" :data-tooltip="$t('stocklist.disclaimer')">(?)</span>:
|
||||||
<span tabindex="0" :data-tooltip="$t('stocklist.disclaimer')">(?)</span>:
|
<span class="text--accent">{{ isFinite(store.maxStockSpeed) ? store.maxStockSpeed : '--' }} km/h</span>
|
||||||
<span class="text--accent">{{ store.maxStockSpeed }} km/h</span>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,41 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="stock_warnings" v-if="hasAnyWarnings">
|
<div class="stock_warnings" v-if="hasAnyWarnings">
|
||||||
<div class="warning" v-if="locoNotSuitable">(!) {{ $t('stocklist.warning-not-suitable') }}</div>
|
<div class="warning" v-if="locoNotSuitable"><TriangleAlertIcon :size="20" :stroke-width="2" /> {{ $t('stocklist.warning-not-suitable') }}</div>
|
||||||
|
|
||||||
<div class="warning" v-if="lengthExceeded && store.isTrainPassenger">
|
<div class="warning" v-if="lengthExceeded && store.isTrainPassenger">
|
||||||
(!) {{ $t('stocklist.warning-passenger-too-long') }}
|
<TriangleAlertIcon :size="20" :stroke-width="2" /> {{ $t('stocklist.warning-passenger-too-long') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="warning" v-if="lengthExceeded && !store.isTrainPassenger">
|
<div class="warning" v-if="lengthExceeded && !store.isTrainPassenger">
|
||||||
(!) {{ $t('stocklist.warning-freight-too-long') }}
|
<TriangleAlertIcon :size="20" :stroke-width="2" /> {{ $t('stocklist.warning-freight-too-long') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="warning" v-if="teamOnlyVehicles.length > 0">
|
<div class="warning" v-if="teamOnlyVehicles.length > 0">
|
||||||
(!)
|
<TriangleAlertIcon :size="20" :stroke-width="2" />
|
||||||
{{
|
{{ $t('stocklist.warning-team-only-vehicle', [teamOnlyVehicles.map((v) => v.vehicleRef.type).join(', ')]) }}
|
||||||
$t('stocklist.warning-team-only-vehicle', [
|
</div>
|
||||||
teamOnlyVehicles.map((v) => v.vehicleRef.type).join(', '),
|
|
||||||
])
|
<div class="warning" v-if="store.cargoWarnings.size > 0">
|
||||||
}}
|
<TriangleAlertIcon :size="20" :stroke-width="2" /> <b>{{ $t('cargo-warnings.title') }}</b>
|
||||||
|
{{ [...store.cargoWarnings].map((v) => $t(`cargo-warnings.${v}`)).join('; ') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="warning" v-if="!isRearPRSM4">
|
||||||
|
<TriangleAlertIcon :size="20" :stroke-width="2" /> {{ $t('stocklist.warning-prsm4-not-at-the-rear') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="warning" v-if="weightExceeded">
|
<div class="warning" v-if="weightExceeded">
|
||||||
(!)
|
<TriangleAlertIcon :size="20" :stroke-width="2" />
|
||||||
<i18n-t keypath="stocklist.warning-too-heavy">
|
<i18n-t keypath="stocklist.warning-too-heavy">
|
||||||
<template #href>
|
<template #href>
|
||||||
<a
|
<a target="_blank" href="https://docs.google.com/spreadsheets/d/1BvTU-U7huIaEheov22TrhTtROUM4MwVfdbq03GVAEM8">
|
||||||
target="_blank"
|
|
||||||
href="https://docs.google.com/spreadsheets/d/1BvTU-U7huIaEheov22TrhTtROUM4MwVfdbq03GVAEM8"
|
|
||||||
>
|
|
||||||
{{ $t('stocklist.acceptable-mass-docs') }}
|
{{ $t('stocklist.acceptable-mass-docs') }}
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="warning" v-if="locoCountExceeded">
|
|
||||||
{{ $t('stocklist.warning-too-many-locos') }}
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -43,8 +41,11 @@
|
|||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { useStore } from '../../../store';
|
import { useStore } from '../../../store';
|
||||||
import { isTractionUnit } from '../../../utils/vehicleUtils';
|
import { isTractionUnit } from '../../../utils/vehicleUtils';
|
||||||
|
import { TriangleAlertIcon } from 'lucide-vue-next';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
components: { TriangleAlertIcon },
|
||||||
|
|
||||||
data: () => ({
|
data: () => ({
|
||||||
store: useStore(),
|
store: useStore(),
|
||||||
}),
|
}),
|
||||||
@@ -55,16 +56,11 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
hasAnyWarnings() {
|
hasAnyWarnings() {
|
||||||
return (
|
return this.weightExceeded || this.lengthExceeded || this.locoNotSuitable || this.teamOnlyVehicles;
|
||||||
this.weightExceeded || this.lengthExceeded || this.locoNotSuitable || this.teamOnlyVehicles
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
lengthExceeded() {
|
lengthExceeded() {
|
||||||
return (
|
return (this.store.totalLength > 350 && this.store.isTrainPassenger) || (this.store.totalLength > 650 && !this.store.isTrainPassenger);
|
||||||
(this.store.totalLength > 350 && this.store.isTrainPassenger) ||
|
|
||||||
(this.store.totalLength > 650 && !this.store.isTrainPassenger)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
weightExceeded() {
|
weightExceeded() {
|
||||||
@@ -76,11 +72,17 @@ export default defineComponent({
|
|||||||
!this.store.isTrainPassenger &&
|
!this.store.isTrainPassenger &&
|
||||||
this.store.stockList.length > 1 &&
|
this.store.stockList.length > 1 &&
|
||||||
!this.store.stockList.every((stock) => isTractionUnit(stock.vehicleRef)) &&
|
!this.store.stockList.every((stock) => isTractionUnit(stock.vehicleRef)) &&
|
||||||
this.store.stockList.some(
|
this.store.stockList.some((stock) => isTractionUnit(stock.vehicleRef) && stock.vehicleRef.type.startsWith('EP'))
|
||||||
(stock) => isTractionUnit(stock.vehicleRef) && stock.vehicleRef.type.startsWith('EP')
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isRearPRSM4() {
|
||||||
|
if (this.store.stockList.length <= 1) return true;
|
||||||
|
|
||||||
|
const index = this.store.stockList.findIndex((stock) => stock.vehicleRef.type.startsWith('PRSM4'));
|
||||||
|
|
||||||
|
return index != -1 ? index == this.store.stockList.length - 1 : true;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -94,6 +96,10 @@ export default defineComponent({
|
|||||||
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
|
.lucide {
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: black;
|
color: black;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|||||||
@@ -7,5 +7,12 @@
|
|||||||
"EP08": [650000, 650000],
|
"EP08": [650000, 650000],
|
||||||
"EP09": [800000, 800000],
|
"EP09": [800000, 800000],
|
||||||
"ET41": [700000, 4000000],
|
"ET41": [700000, 4000000],
|
||||||
"SM42": [2400000, 2400000]
|
"SM42": [2400000, 2400000],
|
||||||
|
"ET22": [650000, 3100000],
|
||||||
|
"201E": [650000, 3100000],
|
||||||
|
"ST44": [3000000, 3000000],
|
||||||
|
"M62": [3000000, 3000000],
|
||||||
|
"CTLR4C": [3000000, 3000000],
|
||||||
|
"SU45": [1500000, 1500000],
|
||||||
|
"SP45": [1500000, 1500000]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,153 +0,0 @@
|
|||||||
{
|
|
||||||
"EU07": {
|
|
||||||
"passenger": {
|
|
||||||
"650000": 125
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"2000000": 70
|
|
||||||
},
|
|
||||||
"none": 110
|
|
||||||
},
|
|
||||||
"4E": {
|
|
||||||
"passenger": {
|
|
||||||
"650000": 125
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"2000000": 70
|
|
||||||
},
|
|
||||||
"none": 110
|
|
||||||
},
|
|
||||||
"EU07E": {
|
|
||||||
"passenger": {
|
|
||||||
"650000": 125
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"2000000": 70
|
|
||||||
},
|
|
||||||
"none": 110
|
|
||||||
},
|
|
||||||
"EP07": {
|
|
||||||
"passenger": {
|
|
||||||
"650000": 125
|
|
||||||
},
|
|
||||||
"cargo": null,
|
|
||||||
"none": 110
|
|
||||||
},
|
|
||||||
"EP08": {
|
|
||||||
"passenger": {
|
|
||||||
"650000": 140
|
|
||||||
},
|
|
||||||
"cargo": null,
|
|
||||||
"none": 110
|
|
||||||
},
|
|
||||||
"EP09": {
|
|
||||||
"passenger": {
|
|
||||||
"650000": 160
|
|
||||||
},
|
|
||||||
"cargo": null,
|
|
||||||
"none": 160
|
|
||||||
},
|
|
||||||
"ET22": {
|
|
||||||
"passenger": {
|
|
||||||
"650000": 125
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"1200000": 100,
|
|
||||||
"3100000": 70
|
|
||||||
},
|
|
||||||
"none": 125
|
|
||||||
},
|
|
||||||
"201E": {
|
|
||||||
"passenger": {
|
|
||||||
"650000": 125
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"1200000": 100,
|
|
||||||
"3100000": 70
|
|
||||||
},
|
|
||||||
"none": 125
|
|
||||||
},
|
|
||||||
"ET41": {
|
|
||||||
"passenger": {
|
|
||||||
"700000": 125
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"4000000": 70
|
|
||||||
},
|
|
||||||
"none": 110
|
|
||||||
},
|
|
||||||
"SM42": {
|
|
||||||
"passenger": {
|
|
||||||
"95000": 90,
|
|
||||||
"200000": 80,
|
|
||||||
"300000": 70,
|
|
||||||
"450000": 60,
|
|
||||||
"750000": 50,
|
|
||||||
"1130000": 40,
|
|
||||||
"1720000": 30,
|
|
||||||
"2400000": 20
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"95000": 90,
|
|
||||||
"200000": 80,
|
|
||||||
"300000": 70,
|
|
||||||
"450000": 60,
|
|
||||||
"750000": 50,
|
|
||||||
"1130000": 40,
|
|
||||||
"1720000": 30,
|
|
||||||
"2400000": 20
|
|
||||||
},
|
|
||||||
"none": 90
|
|
||||||
},
|
|
||||||
"M62": {
|
|
||||||
"passenger": {
|
|
||||||
"500000": 100,
|
|
||||||
"800000": 80,
|
|
||||||
"1200000": 60,
|
|
||||||
"2000000": 40,
|
|
||||||
"3000000": 20
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"500000": 100,
|
|
||||||
"800000": 80,
|
|
||||||
"1200000": 60,
|
|
||||||
"2000000": 40,
|
|
||||||
"3000000": 20
|
|
||||||
},
|
|
||||||
"none": 100
|
|
||||||
},
|
|
||||||
"ST44": {
|
|
||||||
"passenger": {
|
|
||||||
"500000": 100,
|
|
||||||
"800000": 80,
|
|
||||||
"1200000": 60,
|
|
||||||
"2000000": 40,
|
|
||||||
"3000000": 20
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"500000": 100,
|
|
||||||
"800000": 80,
|
|
||||||
"1200000": 60,
|
|
||||||
"2000000": 40,
|
|
||||||
"3000000": 20
|
|
||||||
},
|
|
||||||
"none": 100
|
|
||||||
},
|
|
||||||
"CTLR4C": {
|
|
||||||
"passenger": {
|
|
||||||
"500000": 100,
|
|
||||||
"800000": 80,
|
|
||||||
"1200000": 60,
|
|
||||||
"2000000": 40,
|
|
||||||
"3000000": 20
|
|
||||||
},
|
|
||||||
"cargo": {
|
|
||||||
"500000": 100,
|
|
||||||
"800000": 80,
|
|
||||||
"1200000": 60,
|
|
||||||
"2000000": 40,
|
|
||||||
"3000000": 20
|
|
||||||
},
|
|
||||||
"none": 100
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+282
-27
@@ -1,10 +1,197 @@
|
|||||||
{
|
{
|
||||||
"cargo": {
|
"cargo": {
|
||||||
"kontenery": ["627Z:all", "412Z:all"],
|
"kontenery": [
|
||||||
"chłodnia": ["202Lc:all"],
|
"412Z:sc_20_red",
|
||||||
"drobnica": ["426S:all", "208Kf:all", "401Ka_PKP_Gags:all", "401Ka_PKPC_Gags:all"],
|
"412Z:sc_20_blue",
|
||||||
"węgiel": ["412W:coal_01", "413S:coal_413S", "429W:coal_01", "401Zb:coal_02"],
|
"412Z:sc_20_green",
|
||||||
"ruda": ["412W:ore_01", "401Zl:ore_35", "429W:ore_01"],
|
"412Z:sc_20_APL",
|
||||||
|
"412Z:sc_20_CMA",
|
||||||
|
"412Z:sc_20_Cosco",
|
||||||
|
"412Z:sc_20_Evr1",
|
||||||
|
"412Z:sc_20_Evr2",
|
||||||
|
"412Z:sc_20_Finnlines",
|
||||||
|
"412Z:sc_20_Hamburg",
|
||||||
|
"412Z:sc_20_Hanjin",
|
||||||
|
"412Z:sc_20_HapagLloyd",
|
||||||
|
"412Z:sc_20_HMM",
|
||||||
|
"412Z:sc_20_KLine",
|
||||||
|
"412Z:sc_20_Maersk",
|
||||||
|
"412Z:sc_20_ONE",
|
||||||
|
"412Z:sc_20_OOCL",
|
||||||
|
"412Z:sc_20_Schavemaker",
|
||||||
|
"412Z:sc_20_TD2",
|
||||||
|
"412Z:sc_20_Titan",
|
||||||
|
"412Z:sc_20_Toll",
|
||||||
|
"412Z:sc_40_red",
|
||||||
|
"412Z:sc_40_blue",
|
||||||
|
"412Z:sc_40_green",
|
||||||
|
"412Z:sc_40_APL",
|
||||||
|
"412Z:sc_40_CMA",
|
||||||
|
"412Z:sc_40_Cosco",
|
||||||
|
"412Z:sc_40_Evr1",
|
||||||
|
"412Z:sc_40_Evr2",
|
||||||
|
"412Z:sc_40_Finnlines",
|
||||||
|
"412Z:sc_40_Hamburg",
|
||||||
|
"412Z:sc_40_Hanjin",
|
||||||
|
"412Z:sc_40_HapagLloyd",
|
||||||
|
"412Z:sc_40_HMM",
|
||||||
|
"412Z:sc_40_KLine",
|
||||||
|
"412Z:sc_40_Maersk",
|
||||||
|
"412Z:sc_40_ONE",
|
||||||
|
"412Z:sc_40_OOCL",
|
||||||
|
"412Z:sc_40_Schavemaker",
|
||||||
|
"412Z:sc_40_TD2",
|
||||||
|
"412Z:sc_40_Titan",
|
||||||
|
"412Z:sc_40_Toll",
|
||||||
|
"627Z:sc_20",
|
||||||
|
"627Z:sc_20_red",
|
||||||
|
"627Z:sc_20_blue",
|
||||||
|
"627Z:sc_20_green",
|
||||||
|
"627Z:sc_20_APL",
|
||||||
|
"627Z:sc_20_CMA",
|
||||||
|
"627Z:sc_20_Cosco",
|
||||||
|
"627Z:sc_20_Evr1",
|
||||||
|
"627Z:sc_20_Evr2",
|
||||||
|
"627Z:sc_20_Finnlines",
|
||||||
|
"627Z:sc_20_Hamburg",
|
||||||
|
"627Z:sc_20_Hanjin",
|
||||||
|
"627Z:sc_20_HapagLloyd",
|
||||||
|
"627Z:sc_20_HMM",
|
||||||
|
"627Z:sc_20_KLine",
|
||||||
|
"627Z:sc_20_Maersk",
|
||||||
|
"627Z:sc_20_ONE",
|
||||||
|
"627Z:sc_20_OOCL",
|
||||||
|
"627Z:sc_20_Schavemaker",
|
||||||
|
"627Z:sc_20_TD2",
|
||||||
|
"627Z:sc_20_Titan",
|
||||||
|
"627Z:sc_20_Toll",
|
||||||
|
"627Z:sc_40_red",
|
||||||
|
"627Z:sc_40",
|
||||||
|
"627Z:sc_40_blue",
|
||||||
|
"627Z:sc_40_green",
|
||||||
|
"627Z:sc_40_APL",
|
||||||
|
"627Z:sc_40_CMA",
|
||||||
|
"627Z:sc_40_Cosco",
|
||||||
|
"627Z:sc_40_Evr1",
|
||||||
|
"627Z:sc_40_Evr2",
|
||||||
|
"627Z:sc_40_Finnlines",
|
||||||
|
"627Z:sc_40_Hamburg",
|
||||||
|
"627Z:sc_40_Hanjin",
|
||||||
|
"627Z:sc_40_HapagLloyd",
|
||||||
|
"627Z:sc_40_HMM",
|
||||||
|
"627Z:sc_40_KLine",
|
||||||
|
"627Z:sc_40_Maersk",
|
||||||
|
"627Z:sc_40_ONE",
|
||||||
|
"627Z:sc_40_OOCL",
|
||||||
|
"627Z:sc_40_Schavemaker",
|
||||||
|
"627Z:sc_40_TD2",
|
||||||
|
"627Z:sc_40_Titan",
|
||||||
|
"627Z:sc_40_Toll"
|
||||||
|
],
|
||||||
|
"biomasa": [
|
||||||
|
"412Z:wt_20_biomass",
|
||||||
|
"412Z:wt_20_mix_black_green_biomass",
|
||||||
|
"412Z:wt_20_mix_blue_biomass",
|
||||||
|
"412Z:wt_20_mix_blue_CDC_white_biomass",
|
||||||
|
"412Z:wt_20_mix_blue_white_biomass",
|
||||||
|
"412Z:wt_20_mix_EPC_biomass",
|
||||||
|
"412Z:wt_20_mix_green_biomass",
|
||||||
|
"412Z:wt_20_black_biomass",
|
||||||
|
"412Z:wt_20_blue_biomass",
|
||||||
|
"412Z:wt_20_blue_gr_biomass",
|
||||||
|
"412Z:wt_20_blue_gr_r_biomass",
|
||||||
|
"412Z:wt_20_CDC_biomass",
|
||||||
|
"412Z:wt_20_EPC_black_biomass",
|
||||||
|
"412Z:wt_20_EPC_red_biomass",
|
||||||
|
"412Z:wt_20_green_new_biomass",
|
||||||
|
"412Z:wt_20_green_old_biomass",
|
||||||
|
"412Z:wt_20_white_new_biomass",
|
||||||
|
"412Z:wt_20_white_old_biomass",
|
||||||
|
"412Z:wt_20_white_old_gr_biomass",
|
||||||
|
"412Z:wt_20_white_old_gr_r_biomass",
|
||||||
|
"627Z:wt_20_biomass",
|
||||||
|
"627Z:wt_20_mix_black_green_biomass",
|
||||||
|
"627Z:wt_20_mix_blue_biomass",
|
||||||
|
"627Z:wt_20_mix_blue_CDC_white_biomass",
|
||||||
|
"627Z:wt_20_mix_blue_white_biomass",
|
||||||
|
"627Z:wt_20_mix_EPC_biomass",
|
||||||
|
"627Z:wt_20_mix_green_biomass",
|
||||||
|
"627Z:wt_20_black_biomass",
|
||||||
|
"627Z:wt_20_blue_biomass",
|
||||||
|
"627Z:wt_20_blue_gr_biomass",
|
||||||
|
"627Z:wt_20_blue_gr_r_biomass",
|
||||||
|
"627Z:wt_20_CDC_biomass",
|
||||||
|
"627Z:wt_20_EPC_black_biomass",
|
||||||
|
"627Z:wt_20_EPC_red_biomass",
|
||||||
|
"627Z:wt_20_green_new_biomass",
|
||||||
|
"627Z:wt_20_green_old_biomass",
|
||||||
|
"627Z:wt_20_white_new_biomass",
|
||||||
|
"627Z:wt_20_white_old_biomass",
|
||||||
|
"627Z:wt_20_white_old_gr_biomass",
|
||||||
|
"627Z:wt_20_white_old_gr_r_biomass"
|
||||||
|
],
|
||||||
|
"biomasa-puste": [
|
||||||
|
"412Z:wt_20_empty",
|
||||||
|
"412Z:wt_20_mix_black_green_empty",
|
||||||
|
"412Z:wt_20_mix_blue_empty",
|
||||||
|
"412Z:wt_20_mix_blue_CDC_white_empty",
|
||||||
|
"412Z:wt_20_mix_blue_white_empty",
|
||||||
|
"412Z:wt_20_mix_EPC_empty",
|
||||||
|
"412Z:wt_20_mix_green_empty",
|
||||||
|
"412Z:wt_20_black_empty",
|
||||||
|
"412Z:wt_20_blue_empty",
|
||||||
|
"412Z:wt_20_blue_gr_empty",
|
||||||
|
"412Z:wt_20_blue_gr_r_empty",
|
||||||
|
"412Z:wt_20_CDC_empty",
|
||||||
|
"412Z:wt_20_EPC_black_empty",
|
||||||
|
"412Z:wt_20_EPC_red_empty",
|
||||||
|
"412Z:wt_20_green_new_empty",
|
||||||
|
"412Z:wt_20_green_old_empty",
|
||||||
|
"412Z:wt_20_white_new_empty",
|
||||||
|
"412Z:wt_20_white_old_empty",
|
||||||
|
"412Z:wt_20_white_old_gr_empty",
|
||||||
|
"412Z:wt_20_white_old_gr_r_empty",
|
||||||
|
"627Z:wt_20_empty",
|
||||||
|
"627Z:wt_20_mix_black_green_empty",
|
||||||
|
"627Z:wt_20_mix_blue_empty",
|
||||||
|
"627Z:wt_20_mix_blue_CDC_white_empty",
|
||||||
|
"627Z:wt_20_mix_blue_white_empty",
|
||||||
|
"627Z:wt_20_mix_EPC_empty",
|
||||||
|
"627Z:wt_20_mix_green_empty",
|
||||||
|
"627Z:wt_20_black_empty",
|
||||||
|
"627Z:wt_20_blue_empty",
|
||||||
|
"627Z:wt_20_blue_gr_empty",
|
||||||
|
"627Z:wt_20_blue_gr_r_empty",
|
||||||
|
"627Z:wt_20_CDC_empty",
|
||||||
|
"627Z:wt_20_EPC_black_empty",
|
||||||
|
"627Z:wt_20_EPC_red_empty",
|
||||||
|
"627Z:wt_20_green_new_empty",
|
||||||
|
"627Z:wt_20_green_old_empty",
|
||||||
|
"627Z:wt_20_white_new_empty",
|
||||||
|
"627Z:wt_20_white_old_empty",
|
||||||
|
"627Z:wt_20_white_old_gr_empty",
|
||||||
|
"627Z:wt_20_white_old_gr_r_empty"
|
||||||
|
],
|
||||||
|
"chłodnia": [
|
||||||
|
"202Lc:all"
|
||||||
|
],
|
||||||
|
"drobnica": [
|
||||||
|
"426S:all",
|
||||||
|
"208Kf:all",
|
||||||
|
"401Ka_PKP_Gags:all",
|
||||||
|
"401Ka_PKPC_Gags:all"
|
||||||
|
],
|
||||||
|
"węgiel": [
|
||||||
|
"412W:coal_01",
|
||||||
|
"413S:coal_413S",
|
||||||
|
"429W:coal_01",
|
||||||
|
"401Zb:coal_02"
|
||||||
|
],
|
||||||
|
"ruda": [
|
||||||
|
"412W:ore_01",
|
||||||
|
"401Zl:ore_35",
|
||||||
|
"429W:ore_01"
|
||||||
|
],
|
||||||
"piasek": [
|
"piasek": [
|
||||||
"412W:sand_01",
|
"412W:sand_01",
|
||||||
"412W:sand_02",
|
"412W:sand_02",
|
||||||
@@ -16,7 +203,9 @@
|
|||||||
"418Va:sand_418V",
|
"418Va:sand_418V",
|
||||||
"418Vb:sand_418V"
|
"418Vb:sand_418V"
|
||||||
],
|
],
|
||||||
"kreda": ["413S:chalk_413S"],
|
"kreda": [
|
||||||
|
"413S:chalk_413S"
|
||||||
|
],
|
||||||
"kamień": [
|
"kamień": [
|
||||||
"412W:stone_01",
|
"412W:stone_01",
|
||||||
"412W:stone_50",
|
"412W:stone_50",
|
||||||
@@ -26,32 +215,98 @@
|
|||||||
"418Va:stone_418V",
|
"418Va:stone_418V",
|
||||||
"418Vb:stone_418V"
|
"418Vb:stone_418V"
|
||||||
],
|
],
|
||||||
"złom": ["412W:scrap_01", "412W:scrap_02", "429W:scrap_01", "429W:scrap_02"],
|
"złom": [
|
||||||
"paliwo": ["29R_CTLL:all", "29R_PKP:all", "445Rb:all"],
|
"412W:scrap_01",
|
||||||
"melasa": ["29R_PLPOL:all"],
|
"412W:scrap_02",
|
||||||
"żwir": ["441V"],
|
"429W:scrap_01",
|
||||||
"koła": ["424Z:wheels_01"],
|
"429W:scrap_02"
|
||||||
"drewno": ["424Z:woods_01", "424Z:woods_02"],
|
],
|
||||||
"szyny": ["424Z:rails_01"],
|
"paliwo": [
|
||||||
"kable": ["424Z:cables_01", "24Z:cables_Ks", "401Ze:cables_02"],
|
"29R_CTLL:all",
|
||||||
"kruszywo": ["59WS:all"],
|
"29R_PKP:all",
|
||||||
"techniczne": ["209c", "304Ca", "102a_PKPE", "401Ka_PKP_XGa:all"],
|
"445Rb:all"
|
||||||
"poczta": ["211K:all"],
|
],
|
||||||
|
"melasa": [
|
||||||
|
"29R_PLPOL:all"
|
||||||
|
],
|
||||||
|
"żwir": [
|
||||||
|
"441V"
|
||||||
|
],
|
||||||
|
"koła": [
|
||||||
|
"424Z:wheels_01"
|
||||||
|
],
|
||||||
|
"drewno": [
|
||||||
|
"424Z:woods_01",
|
||||||
|
"424Z:woods_02"
|
||||||
|
],
|
||||||
|
"szyny": [
|
||||||
|
"424Z:rails_01"
|
||||||
|
],
|
||||||
|
"kable": [
|
||||||
|
"424Z:cables_01",
|
||||||
|
"24Z:cables_Ks",
|
||||||
|
"401Ze:cables_02"
|
||||||
|
],
|
||||||
|
"kruszywo": [
|
||||||
|
"59WS:all"
|
||||||
|
],
|
||||||
|
"techniczne": [
|
||||||
|
"209c",
|
||||||
|
"304Ca",
|
||||||
|
"102a_PKPE",
|
||||||
|
"401Ka_PKP_XGa:all"
|
||||||
|
],
|
||||||
|
"poczta": [
|
||||||
|
"211K:all"
|
||||||
|
],
|
||||||
"cement": [
|
"cement": [
|
||||||
"408S:cement_4",
|
"408S:cement_4",
|
||||||
"206S_CEMET:cement_3",
|
"206S_CEMET:cement_3",
|
||||||
"206S_SPEED:cement_3",
|
"206S_SPEED:cement_3",
|
||||||
"220S_CEMET:cement_3"
|
"220S_CEMET:cement_3"
|
||||||
],
|
],
|
||||||
"wapno": ["408S:lime_4", "206S_CEMET:lime_3", "206S_SPEED:lime_3", "220S_CEMET:lime_3"],
|
"wapno": [
|
||||||
"soda": ["408S:soda_4", "206S_CEMET:soda_3", "206S_SPEED:soda_3", "220S_CEMET:soda_3"],
|
"408S:lime_4",
|
||||||
"pszenica": ["206Sh_PKP_Ugpps:wheat_3", "206Sh_PKPC_Ugpps:wheat_3"],
|
"206S_CEMET:lime_3",
|
||||||
"kukurydza": ["206Sh_PKP_Ugpps:corn_3", "206Sh_PKPC_Ugpps:corn_3"],
|
"206S_SPEED:lime_3",
|
||||||
"pasza": ["206Sh_PKP_Ugpps:forage_3", "206Sh_PKPC_Ugpps:forage_3"],
|
"220S_CEMET:lime_3"
|
||||||
"pojazdy": ["426Z:tank_01", "426Z:truck_01", "426Z:vehicles_01"],
|
],
|
||||||
"karbid": ["421S:carbide_01"],
|
"soda": [
|
||||||
"wrażliwe": ["425S:all", "421S:carbide_01"],
|
"408S:soda_4",
|
||||||
"stal": ["401Ze:steel_01", "401Ze:steel_02"],
|
"206S_CEMET:soda_3",
|
||||||
"gaz": ["WB117:all"]
|
"206S_SPEED:soda_3",
|
||||||
|
"220S_CEMET:soda_3"
|
||||||
|
],
|
||||||
|
"pszenica": [
|
||||||
|
"206Sh_PKP_Ugpps:wheat_3",
|
||||||
|
"206Sh_PKPC_Ugpps:wheat_3"
|
||||||
|
],
|
||||||
|
"kukurydza": [
|
||||||
|
"206Sh_PKP_Ugpps:corn_3",
|
||||||
|
"206Sh_PKPC_Ugpps:corn_3"
|
||||||
|
],
|
||||||
|
"pasza": [
|
||||||
|
"206Sh_PKP_Ugpps:forage_3",
|
||||||
|
"206Sh_PKPC_Ugpps:forage_3"
|
||||||
|
],
|
||||||
|
"pojazdy": [
|
||||||
|
"426Z:tank_01",
|
||||||
|
"426Z:truck_01",
|
||||||
|
"426Z:vehicles_01"
|
||||||
|
],
|
||||||
|
"karbid": [
|
||||||
|
"421S:carbide_01"
|
||||||
|
],
|
||||||
|
"wrażliwe": [
|
||||||
|
"425S:all",
|
||||||
|
"421S:carbide_01"
|
||||||
|
],
|
||||||
|
"stal": [
|
||||||
|
"401Ze:steel_01",
|
||||||
|
"401Ze:steel_02"
|
||||||
|
],
|
||||||
|
"gaz": [
|
||||||
|
"WB117:all"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+18
-4
@@ -6,7 +6,8 @@
|
|||||||
"disclaimer": "This site has only an informational intent. The author does not carry any responsibility for creating trains against {tos}!",
|
"disclaimer": "This site has only an informational intent. The author does not carry any responsibility for creating trains against {tos}!",
|
||||||
"tos": "Train Driver 2 simulator rules",
|
"tos": "Train Driver 2 simulator rules",
|
||||||
"tos-href": "https://docs.google.com/document/d/1UAAPUtN0d_RoS4RgOzEzllJZJhA0VcizzCzKW4QylbY/edit#heading=h.1ldcvhomwjp9",
|
"tos-href": "https://docs.google.com/document/d/1UAAPUtN0d_RoS4RgOzEzllJZJhA0VcizzCzKW4QylbY/edit#heading=h.1ldcvhomwjp9",
|
||||||
"version-check": "Site is complete for version {version} of Train Driver 2 simulator"
|
"version-check": "Site is complete for version {version} of Train Driver 2 simulator",
|
||||||
|
"vehicles-count": "Site contains currently {all} vehicles - including {units} traction units and {cars} car wagons!"
|
||||||
},
|
},
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"title": "CHOOSE A VEHICLE",
|
"title": "CHOOSE A VEHICLE",
|
||||||
@@ -83,6 +84,7 @@
|
|||||||
"warning-too-many-locos": "This train has too many traction units!",
|
"warning-too-many-locos": "This train has too many traction units!",
|
||||||
"warning-too-heavy": "This train is too heavy! Check {href}",
|
"warning-too-heavy": "This train is too heavy! Check {href}",
|
||||||
"warning-team-only-vehicle": "There's at least one vehicle available only for TD2 team members in your stock composition! ({0})",
|
"warning-team-only-vehicle": "There's at least one vehicle available only for TD2 team members in your stock composition! ({0})",
|
||||||
|
"warning-prsm4-not-at-the-rear": "PRSM4 welding car must be at the end of a train!",
|
||||||
"acceptable-mass-docs": "acceptable rolling stock masses (PL)",
|
"acceptable-mass-docs": "acceptable rolling stock masses (PL)",
|
||||||
"stock-loading-error": "An error occurred: cannot parse data from the file - make sure it's in a proper format!",
|
"stock-loading-error": "An error occurred: cannot parse data from the file - make sure it's in a proper format!",
|
||||||
"stock-clipboard-error": "An error occurred: cannot read data from the clipboard - make sure the site has been granted right permissions for this action!"
|
"stock-clipboard-error": "An error occurred: cannot read data from the clipboard - make sure the site has been granted right permissions for this action!"
|
||||||
@@ -100,7 +102,7 @@
|
|||||||
"chosen-empty-warning": "Choose at least one cargo type to see available cars!",
|
"chosen-empty-warning": "Choose at least one cargo type to see available cars!",
|
||||||
"chosen-warning": "Cars containing chosen cargo are shown below. Hover over a type to see a preview of the car. Click it to include/exclude it from a drawing (only highlighted types will be included).",
|
"chosen-warning": "Cars containing chosen cargo are shown below. Hover over a type to see a preview of the car. Click it to include/exclude it from a drawing (only highlighted types will be included).",
|
||||||
"action-generate": "GENERATE",
|
"action-generate": "GENERATE",
|
||||||
"action-generate-empty": "GENERATE EMPTY",
|
"action-generate-empty": "GENERATE CARS ALONE",
|
||||||
"action-reset": "RESET CARGO"
|
"action-reset": "RESET CARGO"
|
||||||
},
|
},
|
||||||
"numgen": {
|
"numgen": {
|
||||||
@@ -134,7 +136,7 @@
|
|||||||
"categories": {
|
"categories": {
|
||||||
"EI": "EI - domestic express",
|
"EI": "EI - domestic express",
|
||||||
"EC": "EC - international express",
|
"EC": "EC - international express",
|
||||||
"EN": "EN - domestic night express",
|
"EN": "EN - international night express",
|
||||||
"MP": "MP - intervoivodeship bullet",
|
"MP": "MP - intervoivodeship bullet",
|
||||||
"MO": "MO - intervoivodeship regio",
|
"MO": "MO - intervoivodeship regio",
|
||||||
"MM": "MM - international bullet",
|
"MM": "MM - international bullet",
|
||||||
@@ -220,6 +222,8 @@
|
|||||||
},
|
},
|
||||||
"cargo": {
|
"cargo": {
|
||||||
"kontenery": "containers",
|
"kontenery": "containers",
|
||||||
|
"biomasa": "biomass",
|
||||||
|
"biomasa-puste": "biomass (empty)",
|
||||||
"chłodnia": "refrigerator",
|
"chłodnia": "refrigerator",
|
||||||
"drobnica": "loose cargo",
|
"drobnica": "loose cargo",
|
||||||
"węgiel": "coal",
|
"węgiel": "coal",
|
||||||
@@ -300,6 +304,7 @@
|
|||||||
"401Ze_PKESA": "concrete panels, cable reels, steel",
|
"401Ze_PKESA": "concrete panels, cable reels, steel",
|
||||||
"401Zl": "heavy loose cargo",
|
"401Zl": "heavy loose cargo",
|
||||||
"408S": "cement, lime, fly ash, slag",
|
"408S": "cement, lime, fly ash, slag",
|
||||||
|
"409Va": "loose cargo (sand)",
|
||||||
"412W": "loose cargo, coal",
|
"412W": "loose cargo, coal",
|
||||||
"412Z": "containers",
|
"412Z": "containers",
|
||||||
"413S": "coal, chalk, sand",
|
"413S": "coal, chalk, sand",
|
||||||
@@ -321,6 +326,15 @@
|
|||||||
"418Vb_PKPC": "loose cargo (sand, stone)",
|
"418Vb_PKPC": "loose cargo (sand, stone)",
|
||||||
"418Vb_WIEBE": "loose cargo (sand, stone)",
|
"418Vb_WIEBE": "loose cargo (sand, stone)",
|
||||||
"418Vb_ZOS": "loose cargo (sand, stone)",
|
"418Vb_ZOS": "loose cargo (sand, stone)",
|
||||||
"418Vb_ZUE": "loose cargo (sand, stone)"
|
"418Vb_ZUE": "loose cargo (sand, stone)",
|
||||||
|
"PRSM4": "rail welding car"
|
||||||
|
},
|
||||||
|
"cargo-warnings": {
|
||||||
|
"title": "Rolling stock containing extra cargo warnings:",
|
||||||
|
"warning_wt_20_pn": "PN: exceeded gauge (Innofreight - C45)",
|
||||||
|
"warning_un1965_twr": "TWR: LPG (UN 1965)",
|
||||||
|
"warning_un1965_tn": "TN: LPG - empty tank (UN 1965)",
|
||||||
|
"warning_un1202_tn": "TN: diesel fuel (UN 1202)",
|
||||||
|
"warning_military_pn": "PN: military transport"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+18
-4
@@ -6,7 +6,8 @@
|
|||||||
"disclaimer": "Ta strona ma charakter informacyjny. Autor nie ponosi odpowiedzialności za tworzenie pociągów niezgodnych z {tos}!",
|
"disclaimer": "Ta strona ma charakter informacyjny. Autor nie ponosi odpowiedzialności za tworzenie pociągów niezgodnych z {tos}!",
|
||||||
"tos": "regulaminem symulatora Train Driver 2",
|
"tos": "regulaminem symulatora Train Driver 2",
|
||||||
"tos-href": "https://docs.google.com/document/d/1UAAPUtN0d_RoS4RgOzEzllJZJhA0VcizzCzKW4QylbY/edit",
|
"tos-href": "https://docs.google.com/document/d/1UAAPUtN0d_RoS4RgOzEzllJZJhA0VcizzCzKW4QylbY/edit",
|
||||||
"version-check": "Strona jest kompletna dla wersji {version} symulatora TD2"
|
"version-check": "Strona jest kompletna dla wersji {version} symulatora TD2",
|
||||||
|
"vehicles-count": "Strona zawiera obecnie {all} pojazdów - w tym {units} jednostek trakcyjnych i {cars} wagonów!"
|
||||||
},
|
},
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"title": "WYBIERZ POJAZD",
|
"title": "WYBIERZ POJAZD",
|
||||||
@@ -83,6 +84,7 @@
|
|||||||
"warning-too-many-locos": "Ten skład posiada za dużo pojazdów trakcyjnych!",
|
"warning-too-many-locos": "Ten skład posiada za dużo pojazdów trakcyjnych!",
|
||||||
"warning-too-heavy": "Ten skład jest za ciężki! Sprawdź {href}",
|
"warning-too-heavy": "Ten skład jest za ciężki! Sprawdź {href}",
|
||||||
"warning-team-only-vehicle": "W zestawieniu znajduje się co najmniej jeden pojazd dostępny tylko dla członków zespołu TD2! ({0})",
|
"warning-team-only-vehicle": "W zestawieniu znajduje się co najmniej jeden pojazd dostępny tylko dla członków zespołu TD2! ({0})",
|
||||||
|
"warning-prsm4-not-at-the-rear": "Zgrzewarka PRSM4 może znajdować się jedynie na końcu składu w przypadku jazdy pociągowej!",
|
||||||
"acceptable-mass-docs": "dopuszczalne masy składów",
|
"acceptable-mass-docs": "dopuszczalne masy składów",
|
||||||
"stock-loading-error": "Wystąpił błąd: nie można przetworzyć danych ze schowka! Upewnij się, że są one w poprawnym formacie!",
|
"stock-loading-error": "Wystąpił błąd: nie można przetworzyć danych ze schowka! Upewnij się, że są one w poprawnym formacie!",
|
||||||
"stock-clipboard-error": "Wystąpił błąd: nie można odczytać danych ze schowka! Upewnij się, że nadałeś uprawnienia stronie do tej akcji!"
|
"stock-clipboard-error": "Wystąpił błąd: nie można odczytać danych ze schowka! Upewnij się, że nadałeś uprawnienia stronie do tej akcji!"
|
||||||
@@ -100,7 +102,7 @@
|
|||||||
"chosen-empty-warning": "Wybierz co najmniej jeden ładunek, aby zobaczyć wagony, które go posiadają!",
|
"chosen-empty-warning": "Wybierz co najmniej jeden ładunek, aby zobaczyć wagony, które go posiadają!",
|
||||||
"chosen-warning": "Wagony posiadające wybrane ładunki. Najedź na nazwę, aby zobaczyć podgląd wagonu. Kliknij, aby wyłączyć z losowania (tylko podświetlone nazwy będą uwzględnione).",
|
"chosen-warning": "Wagony posiadające wybrane ładunki. Najedź na nazwę, aby zobaczyć podgląd wagonu. Kliknij, aby wyłączyć z losowania (tylko podświetlone nazwy będą uwzględnione).",
|
||||||
"action-generate": "WYGENERUJ",
|
"action-generate": "WYGENERUJ",
|
||||||
"action-generate-empty": "WYGENERUJ PRÓŻNE WAGONY",
|
"action-generate-empty": "WYGENERUJ SAME WAGONY",
|
||||||
"action-reset": "ZRESETUJ ŁADUNKI"
|
"action-reset": "ZRESETUJ ŁADUNKI"
|
||||||
},
|
},
|
||||||
"numgen": {
|
"numgen": {
|
||||||
@@ -134,7 +136,7 @@
|
|||||||
"categories": {
|
"categories": {
|
||||||
"EI": "EI - ekspres krajowy",
|
"EI": "EI - ekspres krajowy",
|
||||||
"EC": "EC - ekspres międzynarodowy",
|
"EC": "EC - ekspres międzynarodowy",
|
||||||
"EN": "EN - ekspres krajowy nocny",
|
"EN": "EN - ekspres międzynarodowy nocny",
|
||||||
"MP": "MP - międzywoj. pośpieszny",
|
"MP": "MP - międzywoj. pośpieszny",
|
||||||
"RP": "RP - wojewódzki pośpieszny",
|
"RP": "RP - wojewódzki pośpieszny",
|
||||||
"MO": "MO - międzywoj. osobowy",
|
"MO": "MO - międzywoj. osobowy",
|
||||||
@@ -220,6 +222,8 @@
|
|||||||
},
|
},
|
||||||
"cargo": {
|
"cargo": {
|
||||||
"kontenery": "kontenery",
|
"kontenery": "kontenery",
|
||||||
|
"biomasa": "biomasa",
|
||||||
|
"biomasa-puste": "biomasa (puste)",
|
||||||
"chłodnia": "chłodnia",
|
"chłodnia": "chłodnia",
|
||||||
"drobnica": "drobnica",
|
"drobnica": "drobnica",
|
||||||
"węgiel": "węgiel",
|
"węgiel": "węgiel",
|
||||||
@@ -299,6 +303,7 @@
|
|||||||
"401Ze_PKESA": "płyty betonowe, bębny kablowe, stal",
|
"401Ze_PKESA": "płyty betonowe, bębny kablowe, stal",
|
||||||
"401Zl": "ładunki sypkie o dużej masie usypowej",
|
"401Zl": "ładunki sypkie o dużej masie usypowej",
|
||||||
"408S": "cement, wapno, popioły lotne, żużel",
|
"408S": "cement, wapno, popioły lotne, żużel",
|
||||||
|
"409Va": "drobnica, ładunki sypkie (piasek)",
|
||||||
"412W": "drobnica, kruszywo, węgiel",
|
"412W": "drobnica, kruszywo, węgiel",
|
||||||
"412Z": "kontenery",
|
"412Z": "kontenery",
|
||||||
"413S": "węgiel, kreda, piasek",
|
"413S": "węgiel, kreda, piasek",
|
||||||
@@ -320,6 +325,15 @@
|
|||||||
"418Vb_PKPC": "drobnica, ładunki sypkie (piasek, kamień)",
|
"418Vb_PKPC": "drobnica, ładunki sypkie (piasek, kamień)",
|
||||||
"418Vb_WIEBE": "drobnica, ładunki sypkie (piasek, kamień)",
|
"418Vb_WIEBE": "drobnica, ładunki sypkie (piasek, kamień)",
|
||||||
"418Vb_ZOS": "drobnica, ładunki sypkie (piasek, kamień)",
|
"418Vb_ZOS": "drobnica, ładunki sypkie (piasek, kamień)",
|
||||||
"418Vb_ZUE": "drobnica, ładunki sypkie (piasek, kamień)"
|
"418Vb_ZUE": "drobnica, ładunki sypkie (piasek, kamień)",
|
||||||
|
"PRSM4": "zgrzewarka torowa"
|
||||||
|
},
|
||||||
|
"cargo-warnings": {
|
||||||
|
"title": "Skład z dodatkowymi uwagami przewozowymi:",
|
||||||
|
"warning_wt_20_pn": "PN: przekroczona skrajnia (Innofreight - C45)",
|
||||||
|
"warning_un1965_twr": "TWR: gazy węglowodorowe skroplone (UN 1965)",
|
||||||
|
"warning_un1965_tn": "TN: gazy węglowodorowe skroplone - puste cysterny (UN 1965)",
|
||||||
|
"warning_un1202_tn": "TN: olej napędowy (UN 1202)",
|
||||||
|
"warning_military_pn": "PN: transport wojskowy"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+6
-13
@@ -15,6 +15,7 @@ import { defineStore } from 'pinia';
|
|||||||
import {
|
import {
|
||||||
acceptableWeight,
|
acceptableWeight,
|
||||||
carDataList,
|
carDataList,
|
||||||
|
getCargoWarnings,
|
||||||
isTractionUnit,
|
isTractionUnit,
|
||||||
isTrainPassenger,
|
isTrainPassenger,
|
||||||
locoDataList,
|
locoDataList,
|
||||||
@@ -25,13 +26,11 @@ import {
|
|||||||
totalWeight,
|
totalWeight,
|
||||||
} from './utils/vehicleUtils';
|
} from './utils/vehicleUtils';
|
||||||
|
|
||||||
import i18n from './i18n-setup';
|
|
||||||
import http from './http';
|
import http from './http';
|
||||||
|
|
||||||
import realCompositionsJSON from './data/realCompositions.json';
|
import realCompositionsJSON from './data/realCompositions.json';
|
||||||
|
|
||||||
export const useStore = defineStore({
|
export const useStore = defineStore('store', {
|
||||||
id: 'store',
|
|
||||||
state: () => ({
|
state: () => ({
|
||||||
chosenCar: null as ICarWagon | null,
|
chosenCar: null as ICarWagon | null,
|
||||||
chosenLoco: null as ILocomotive | null,
|
chosenLoco: null as ILocomotive | null,
|
||||||
@@ -70,15 +69,13 @@ export const useStore = defineStore({
|
|||||||
getters: {
|
getters: {
|
||||||
locoDataList: (state) => locoDataList(state.vehiclesData),
|
locoDataList: (state) => locoDataList(state.vehiclesData),
|
||||||
carDataList: (state) => carDataList(state.vehiclesData),
|
carDataList: (state) => carDataList(state.vehiclesData),
|
||||||
vehicleDataList: (state) => [
|
vehicleDataList: (state) => [...locoDataList(state.vehiclesData), ...carDataList(state.vehiclesData)],
|
||||||
...locoDataList(state.vehiclesData),
|
|
||||||
...carDataList(state.vehiclesData),
|
|
||||||
],
|
|
||||||
totalWeight: (state) => totalWeight(state.stockList),
|
totalWeight: (state) => totalWeight(state.stockList),
|
||||||
totalLength: (state) => totalLength(state.stockList),
|
totalLength: (state) => totalLength(state.stockList),
|
||||||
maxStockSpeed: (state) => maxStockSpeed(state.stockList),
|
maxStockSpeed: (state) => maxStockSpeed(state.stockList),
|
||||||
isTrainPassenger: (state) => isTrainPassenger(state.stockList),
|
isTrainPassenger: (state) => isTrainPassenger(state.stockList),
|
||||||
acceptableWeight: (state) => acceptableWeight(state.stockList),
|
acceptableWeight: (state) => acceptableWeight(state.stockList),
|
||||||
|
cargoWarnings: (state) => getCargoWarnings(state.stockList),
|
||||||
|
|
||||||
stockSupportsColdStart: (state) => stockSupportsColdStart(state.stockList),
|
stockSupportsColdStart: (state) => stockSupportsColdStart(state.stockList),
|
||||||
stockSupportsDoubleManning: (state) => stockSupportsDoubleManning(state.stockList),
|
stockSupportsDoubleManning: (state) => stockSupportsDoubleManning(state.stockList),
|
||||||
@@ -87,15 +84,11 @@ export const useStore = defineStore({
|
|||||||
if (state.stockList.length == 0) return '';
|
if (state.stockList.length == 0) return '';
|
||||||
|
|
||||||
const coldStartActive = state.isColdStart && stockSupportsColdStart(state.stockList);
|
const coldStartActive = state.isColdStart && stockSupportsColdStart(state.stockList);
|
||||||
const doubleManningActive =
|
const doubleManningActive = state.isDoubleManned && stockSupportsDoubleManning(state.stockList);
|
||||||
state.isDoubleManned && stockSupportsDoubleManning(state.stockList);
|
|
||||||
|
|
||||||
return state.stockList
|
return state.stockList
|
||||||
.map((stock, i) => {
|
.map((stock, i) => {
|
||||||
let stockTypeStr =
|
let stockTypeStr = isTractionUnit(stock.vehicleRef) || !stock.cargo ? stock.vehicleRef.type : `${stock.vehicleRef.type}:${stock.cargo.id}`;
|
||||||
isTractionUnit(stock.vehicleRef) || !stock.cargo
|
|
||||||
? stock.vehicleRef.type
|
|
||||||
: `${stock.vehicleRef.type}:${stock.cargo.id}`;
|
|
||||||
|
|
||||||
if (i == 0 && (coldStartActive || doubleManningActive))
|
if (i == 0 && (coldStartActive || doubleManningActive))
|
||||||
return `${stockTypeStr},${coldStartActive ? 'c' : ''}${doubleManningActive ? 'd' : ''}`;
|
return `${stockTypeStr},${coldStartActive ? 'c' : ''}${doubleManningActive ? 'd' : ''}`;
|
||||||
|
|||||||
+2
-10
@@ -10,16 +10,6 @@ $accentColor: #e4c428;
|
|||||||
$sponsorColor: gold;
|
$sponsorColor: gold;
|
||||||
$teamColor: #ff4848;
|
$teamColor: #ff4848;
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Lato';
|
|
||||||
src:
|
|
||||||
url('/fonts/Lato-Light.woff2') format('woff2'),
|
|
||||||
url('/fonts/Lato-Light.woff') format('woff');
|
|
||||||
font-weight: 300;
|
|
||||||
font-style: normal;
|
|
||||||
font-display: swap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Lato';
|
font-family: 'Lato';
|
||||||
src:
|
src:
|
||||||
@@ -358,6 +348,7 @@ hr {
|
|||||||
|
|
||||||
// Vue Transition anims
|
// Vue Transition anims
|
||||||
.slide-top {
|
.slide-top {
|
||||||
|
|
||||||
&-enter-from,
|
&-enter-from,
|
||||||
&-leave-to {
|
&-leave-to {
|
||||||
transform: translateY(-100%);
|
transform: translateY(-100%);
|
||||||
@@ -370,6 +361,7 @@ hr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card-appear {
|
.card-appear {
|
||||||
|
|
||||||
&-enter-from,
|
&-enter-from,
|
||||||
&-leave-to {
|
&-leave-to {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|||||||
@@ -28,12 +28,14 @@ export interface ILocomotive {
|
|||||||
constructionType: string;
|
constructionType: string;
|
||||||
cabinType: string;
|
cabinType: string;
|
||||||
maxSpeed: number;
|
maxSpeed: number;
|
||||||
|
maxSpeedLoco: number;
|
||||||
weight: number;
|
weight: number;
|
||||||
length: number;
|
length: number;
|
||||||
coldStart: boolean;
|
coldStart: boolean;
|
||||||
doubleManned: boolean;
|
doubleManned: boolean;
|
||||||
sponsorOnlyTimestamp: number;
|
sponsorOnlyTimestamp: number;
|
||||||
teamOnly: boolean;
|
teamOnly: boolean;
|
||||||
|
massSpeeds: VehicleGroupMassSpeeds | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICarWagon {
|
export interface ICarWagon {
|
||||||
@@ -42,11 +44,13 @@ export interface ICarWagon {
|
|||||||
constructionType: string;
|
constructionType: string;
|
||||||
loadable: boolean;
|
loadable: boolean;
|
||||||
maxSpeed: number;
|
maxSpeed: number;
|
||||||
|
maxSpeedLoaded: number;
|
||||||
weight: number;
|
weight: number;
|
||||||
length: number;
|
length: number;
|
||||||
cargoTypes: ICargo[];
|
cargoTypes: ICargo[];
|
||||||
sponsorOnlyTimestamp: number;
|
sponsorOnlyTimestamp: number;
|
||||||
teamOnly: boolean;
|
teamOnly: boolean;
|
||||||
|
massSpeeds: VehicleGroupMassSpeeds | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IStock {
|
export interface IStock {
|
||||||
@@ -70,6 +74,7 @@ export interface IVehicleData {
|
|||||||
cabinName: string | null;
|
cabinName: string | null;
|
||||||
restrictions: IVehicleRestrictions | null;
|
restrictions: IVehicleRestrictions | null;
|
||||||
vehicleGroupsId: number;
|
vehicleGroupsId: number;
|
||||||
|
simulatorVersion: string;
|
||||||
group: IVehicleGroup;
|
group: IVehicleGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,10 +87,13 @@ export interface IVehicleGroup {
|
|||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
speed: number;
|
speed: number;
|
||||||
|
speedLoaded?: number;
|
||||||
|
speedLoco?: number;
|
||||||
length: number;
|
length: number;
|
||||||
weight: number;
|
weight: number;
|
||||||
cargoTypes: IVehicleCargoType[] | null;
|
cargoTypes: IVehicleCargoType[] | null;
|
||||||
locoProps: IVehicleLocoProps | null;
|
locoProps: IVehicleLocoProps | null;
|
||||||
|
massSpeeds: VehicleGroupMassSpeeds | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IVehicleCargoType {
|
export interface IVehicleCargoType {
|
||||||
@@ -98,6 +106,12 @@ export interface IVehicleLocoProps {
|
|||||||
doubleManned: boolean;
|
doubleManned: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface VehicleGroupMassSpeeds {
|
||||||
|
passenger: Record<string, number> | null;
|
||||||
|
cargo: Record<string, number> | null;
|
||||||
|
none: number | null;
|
||||||
|
}
|
||||||
|
|
||||||
export interface StorageStockEntry {
|
export interface StorageStockEntry {
|
||||||
id: string;
|
id: string;
|
||||||
createdAt: number;
|
createdAt: number;
|
||||||
|
|||||||
@@ -1,29 +1,47 @@
|
|||||||
import speedLimits from '../constants/speedLimits.json';
|
|
||||||
import massLimits from '../constants/massLimits.json';
|
import massLimits from '../constants/massLimits.json';
|
||||||
|
import { IStock } from '../types/common.types';
|
||||||
|
|
||||||
export type SpeedLimitLocoType = keyof typeof speedLimits;
|
|
||||||
export type MassLimitLocoType = keyof typeof massLimits;
|
export type MassLimitLocoType = keyof typeof massLimits;
|
||||||
|
|
||||||
export function calculateSpeedLimit(
|
export function calculateSpeedLimit(stockList: IStock[], isPassenger: boolean, stockMass: number) {
|
||||||
locoType: SpeedLimitLocoType,
|
// Check the whole consist speed limit
|
||||||
stockTotalWeight: number,
|
const stockMaxSpeed = stockList.reduce((acc, vehicle, i) => {
|
||||||
stockCount: number,
|
let vehicleSpeed = vehicle.vehicleRef.maxSpeed;
|
||||||
isTrainPassenger: boolean
|
|
||||||
|
if (
|
||||||
|
vehicle.vehicleRef.group == 'wagon-freight' &&
|
||||||
|
vehicle.cargo !== undefined &&
|
||||||
|
vehicle.vehicleRef.maxSpeedLoaded
|
||||||
) {
|
) {
|
||||||
if (speedLimits[locoType] === undefined) return 0;
|
vehicleSpeed = vehicle.vehicleRef.maxSpeedLoaded;
|
||||||
|
}
|
||||||
|
|
||||||
if (stockCount == 1) return speedLimits[locoType]['none'];
|
return Math.min(vehicleSpeed, acc);
|
||||||
|
}, Infinity);
|
||||||
|
|
||||||
const stockType = isTrainPassenger ? 'passenger' : 'cargo';
|
// Check the head vehicle speed limit
|
||||||
const speedTable = speedLimits[locoType][stockType];
|
const headVehicle = stockList[0];
|
||||||
|
|
||||||
if (!speedTable) return undefined;
|
// Omit speed check for head vehicle if there's no data for it
|
||||||
|
if (!headVehicle || !headVehicle.vehicleRef.massSpeeds) return stockMaxSpeed;
|
||||||
|
|
||||||
let speedLimit = 0;
|
const massSpeeds =
|
||||||
for (const mass in speedTable)
|
headVehicle.vehicleRef.massSpeeds[
|
||||||
if (stockTotalWeight > Number(mass)) speedLimit = (speedTable as any)[mass];
|
stockList.length == 1 ? 'none' : isPassenger ? 'passenger' : 'cargo'
|
||||||
|
];
|
||||||
|
|
||||||
return speedLimit;
|
// Omit speed check if there's no data on mass speeds
|
||||||
|
if (!massSpeeds) return stockMaxSpeed;
|
||||||
|
|
||||||
|
// Number type for locomotives alone
|
||||||
|
if (typeof massSpeeds === 'number') return massSpeeds;
|
||||||
|
|
||||||
|
// Record type for passenger or cargo, find the closest range
|
||||||
|
const massKey = Object.keys(massSpeeds).findLast((massKey) => stockMass >= Number(massKey));
|
||||||
|
|
||||||
|
const massMaxSpeed = massKey ? massSpeeds[massKey] : Infinity;
|
||||||
|
|
||||||
|
return Math.min(massMaxSpeed, stockMaxSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function calculateMassLimit(locoType: MassLimitLocoType, isTrainPassenger: boolean) {
|
export function calculateMassLimit(locoType: MassLimitLocoType, isTrainPassenger: boolean) {
|
||||||
|
|||||||
+30
-57
@@ -1,18 +1,5 @@
|
|||||||
import {
|
import { ICarWagon, ILocomotive, IStock, IVehicleData, LocoGroupType, WagonGroupType } from '../types/common.types';
|
||||||
ICarWagon,
|
import { MassLimitLocoType, calculateMassLimit, calculateSpeedLimit } from './vehicleLimitsUtils';
|
||||||
ILocomotive,
|
|
||||||
IStock,
|
|
||||||
IVehicleData,
|
|
||||||
IVehiclesAPIResponse,
|
|
||||||
LocoGroupType,
|
|
||||||
WagonGroupType,
|
|
||||||
} from '../types/common.types';
|
|
||||||
import {
|
|
||||||
MassLimitLocoType,
|
|
||||||
SpeedLimitLocoType,
|
|
||||||
calculateMassLimit,
|
|
||||||
calculateSpeedLimit,
|
|
||||||
} from './vehicleLimitsUtils';
|
|
||||||
|
|
||||||
export function isTractionUnit(vehicle: ILocomotive | ICarWagon): vehicle is ILocomotive {
|
export function isTractionUnit(vehicle: ILocomotive | ICarWagon): vehicle is ILocomotive {
|
||||||
return (vehicle as ILocomotive).cabinType !== undefined;
|
return (vehicle as ILocomotive).cabinType !== undefined;
|
||||||
@@ -35,11 +22,14 @@ export function locoDataList(vehiclesData: IVehicleData[] | undefined) {
|
|||||||
teamOnly: data.restrictions?.teamOnly ?? false,
|
teamOnly: data.restrictions?.teamOnly ?? false,
|
||||||
|
|
||||||
maxSpeed: data.group.speed,
|
maxSpeed: data.group.speed,
|
||||||
|
maxSpeedLoco: data.group.speedLoco ?? data.group.speed,
|
||||||
length: data.group.length,
|
length: data.group.length,
|
||||||
weight: data.group.weight,
|
weight: data.group.weight,
|
||||||
|
|
||||||
coldStart: data.group.locoProps?.coldStart ?? false,
|
coldStart: data.group.locoProps?.coldStart ?? false,
|
||||||
doubleManned: data.group.locoProps?.doubleManned ?? false,
|
doubleManned: data.group.locoProps?.doubleManned ?? false,
|
||||||
|
|
||||||
|
massSpeeds: data.group.massSpeeds,
|
||||||
});
|
});
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
@@ -63,8 +53,12 @@ export function carDataList(vehiclesData: IVehicleData[] | undefined) {
|
|||||||
teamOnly: data.restrictions?.teamOnly ?? false,
|
teamOnly: data.restrictions?.teamOnly ?? false,
|
||||||
|
|
||||||
maxSpeed: data.group.speed,
|
maxSpeed: data.group.speed,
|
||||||
|
maxSpeedLoaded: data.group.speedLoaded ?? data.group.speed,
|
||||||
|
|
||||||
length: data.group.length,
|
length: data.group.length,
|
||||||
weight: data.group.weight,
|
weight: data.group.weight,
|
||||||
|
|
||||||
|
massSpeeds: data.group.massSpeeds,
|
||||||
});
|
});
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
@@ -72,10 +66,7 @@ export function carDataList(vehiclesData: IVehicleData[] | undefined) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function totalWeight(stockList: IStock[]) {
|
export function totalWeight(stockList: IStock[]) {
|
||||||
return stockList.reduce(
|
return stockList.reduce((acc, stock) => acc + (stock.vehicleRef.weight + (stock.cargo?.weight ?? 0)), 0);
|
||||||
(acc, stock) => acc + (stock.vehicleRef.weight + (stock.cargo?.weight ?? 0)),
|
|
||||||
0
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function totalLength(stockList: IStock[]) {
|
export function totalLength(stockList: IStock[]) {
|
||||||
@@ -83,27 +74,7 @@ export function totalLength(stockList: IStock[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function maxStockSpeed(stockList: IStock[]) {
|
export function maxStockSpeed(stockList: IStock[]) {
|
||||||
const stockSpeedLimit = stockList.reduce(
|
return calculateSpeedLimit(stockList, isTrainPassenger(stockList), totalWeight(stockList));
|
||||||
(acc, stock) => (stock.vehicleRef.maxSpeed < acc || acc == 0 ? stock.vehicleRef.maxSpeed : acc),
|
|
||||||
0
|
|
||||||
);
|
|
||||||
const headingLoco =
|
|
||||||
stockList[0] && isTractionUnit(stockList[0].vehicleRef) ? stockList[0] : undefined;
|
|
||||||
|
|
||||||
if (!headingLoco) return stockSpeedLimit;
|
|
||||||
|
|
||||||
const locoType = headingLoco.vehicleRef.type.split('-')[0];
|
|
||||||
|
|
||||||
if (/^(EN|2EN|SN)/.test(locoType)) return stockSpeedLimit;
|
|
||||||
|
|
||||||
const speedLimitByMass = calculateSpeedLimit(
|
|
||||||
locoType as SpeedLimitLocoType,
|
|
||||||
totalWeight(stockList),
|
|
||||||
stockList.length,
|
|
||||||
isTrainPassenger(stockList)
|
|
||||||
);
|
|
||||||
|
|
||||||
return speedLimitByMass ? Math.min(stockSpeedLimit, speedLimitByMass) : stockSpeedLimit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function acceptableWeight(stockList: IStock[]) {
|
export function acceptableWeight(stockList: IStock[]) {
|
||||||
@@ -111,10 +82,7 @@ export function acceptableWeight(stockList: IStock[]) {
|
|||||||
|
|
||||||
const activeLocomotiveType = stockList[0].vehicleRef.type.split('-')[0];
|
const activeLocomotiveType = stockList[0].vehicleRef.type.split('-')[0];
|
||||||
|
|
||||||
const locoMassLimit = calculateMassLimit(
|
const locoMassLimit = calculateMassLimit(activeLocomotiveType as MassLimitLocoType, isTrainPassenger(stockList));
|
||||||
activeLocomotiveType as MassLimitLocoType,
|
|
||||||
isTrainPassenger(stockList)
|
|
||||||
);
|
|
||||||
|
|
||||||
return locoMassLimit;
|
return locoMassLimit;
|
||||||
}
|
}
|
||||||
@@ -123,23 +91,28 @@ export function isTrainPassenger(stockList: IStock[]) {
|
|||||||
if (stockList.length == 0) return false;
|
if (stockList.length == 0) return false;
|
||||||
if (stockList.every((stock) => isTractionUnit(stock.vehicleRef))) return false;
|
if (stockList.every((stock) => isTractionUnit(stock.vehicleRef))) return false;
|
||||||
|
|
||||||
return stockList
|
return stockList.filter((stock) => !isTractionUnit(stock.vehicleRef)).every((stock) => stock.vehicleRef.group === 'wagon-passenger');
|
||||||
.filter((stock) => !isTractionUnit(stock.vehicleRef))
|
|
||||||
.every((stock) => stock.vehicleRef.group === 'wagon-passenger');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function stockSupportsColdStart(stockList: IStock[]) {
|
export function stockSupportsColdStart(stockList: IStock[]) {
|
||||||
return (
|
return stockList.length == 1 && isTractionUnit(stockList[0].vehicleRef) && stockList[0].vehicleRef.coldStart;
|
||||||
stockList.length == 1 &&
|
|
||||||
isTractionUnit(stockList[0].vehicleRef) &&
|
|
||||||
stockList[0].vehicleRef.coldStart
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function stockSupportsDoubleManning(stockList: IStock[]) {
|
export function stockSupportsDoubleManning(stockList: IStock[]) {
|
||||||
return (
|
return stockList.length != 0 && isTractionUnit(stockList[0].vehicleRef) && stockList[0].vehicleRef.doubleManned;
|
||||||
stockList.length != 0 &&
|
}
|
||||||
isTractionUnit(stockList[0].vehicleRef) &&
|
|
||||||
stockList[0].vehicleRef.doubleManned
|
export function getCargoWarnings(stockList: IStock[]) {
|
||||||
);
|
let warnings: Set<string> = new Set();
|
||||||
|
|
||||||
|
stockList.forEach((stockVehicle) => {
|
||||||
|
if (stockVehicle.vehicleRef.group == 'wagon-freight') {
|
||||||
|
if (stockVehicle.cargo && stockVehicle.cargo.id.startsWith('wt_20')) warnings.add('warning_wt_20_pn');
|
||||||
|
else if (stockVehicle.cargo && /^(tank|vehicles|truck)/.test(stockVehicle.cargo.id)) warnings.add('warning_military_pn');
|
||||||
|
else if (stockVehicle.vehicleRef.type.startsWith('WB117')) warnings.add(stockVehicle.cargo ? 'warning_un1965_twr' : 'warning_un1965_tn');
|
||||||
|
else if (stockVehicle.vehicleRef.type.startsWith('445Rb')) warnings.add('warning_un1202_tn');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return warnings;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ export default defineConfig({
|
|||||||
runtimeCaching: [
|
runtimeCaching: [
|
||||||
{
|
{
|
||||||
urlPattern: /^https:\/\/.*\.spythere\.eu\/.*/i,
|
urlPattern: /^https:\/\/.*\.spythere\.eu\/.*/i,
|
||||||
handler: 'StaleWhileRevalidate',
|
handler: 'NetworkFirst',
|
||||||
options: { cacheName: 'spythere-cache' },
|
options: { cacheName: 'spythere-cache' },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user