mirror of
https://github.com/Spythere/srjp-td2.git
synced 2026-05-03 05:28:12 +00:00
chore: added train vmax field
This commit is contained in:
@@ -152,7 +152,7 @@
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="text-center border border-white print:border-black" :class="{ 'text-stone-400 ': i > 0 }">70</td>
|
||||
<td class="text-center border border-white print:border-black" :class="{ 'text-stone-400 ': i > 0 }">{{ row.stockVmax }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</template>
|
||||
|
||||
@@ -26,23 +26,21 @@ const globalStore = useGlobalStore();
|
||||
const apiStore = useApiStore();
|
||||
|
||||
const computedTimetable = computed(() => {
|
||||
if (!globalStore.selectedTrain) return [];
|
||||
if (!globalStore.selectedTrain || !globalStore.selectedTrain.timetable) return [];
|
||||
|
||||
const timetable = globalStore.selectedTrain.timetable;
|
||||
|
||||
if (!timetable) return [];
|
||||
const { timetable, stockString, mass, length } = globalStore.selectedTrain;
|
||||
|
||||
let timeFrom = Date.now();
|
||||
|
||||
const headLocos = globalStore.selectedTrain.stockString
|
||||
const headLocos = stockString
|
||||
.split(';')
|
||||
.slice(0, 3)
|
||||
.filter((s, i) => i == 0 || /-\d+$/.test(s))
|
||||
.map((s) => s.slice(0, s.indexOf('-')));
|
||||
|
||||
const stockVmax = 70,
|
||||
stockMass = Math.floor(globalStore.selectedTrain.mass / 1000),
|
||||
stockLength = globalStore.selectedTrain.length;
|
||||
const stockVmax = timetable.trainMaxSpeed,
|
||||
stockMass = Math.floor(mass / 1000),
|
||||
stockLength = length;
|
||||
|
||||
const timetablePath = timetable.path.split(';').map((pathEl) => {
|
||||
const [arrivalLine, scenery, departureLine] = pathEl.split(',');
|
||||
@@ -204,8 +202,4 @@ function getAbbrevs(routeData: SceneryRoute) {
|
||||
|
||||
return abbrevs;
|
||||
}
|
||||
|
||||
// function getRadioChannel() {
|
||||
// return Math.floor(Math.random() * 6 + 1);
|
||||
// }
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
const speedLimits = {
|
||||
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,
|
||||
'2000000': 90,
|
||||
'2500000': 80,
|
||||
'3100000': 70,
|
||||
},
|
||||
none: 125,
|
||||
},
|
||||
'201E': {
|
||||
passenger: {
|
||||
'650000': 125,
|
||||
},
|
||||
cargo: {
|
||||
'1200000': 100,
|
||||
'2000000': 90,
|
||||
'2500000': 80,
|
||||
'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,
|
||||
},
|
||||
};
|
||||
@@ -38,6 +38,7 @@ export interface ActiveTrainTimetable {
|
||||
timetableId: number;
|
||||
sceneries: string[];
|
||||
path: string;
|
||||
trainMaxSpeed: number;
|
||||
}
|
||||
|
||||
export interface TimetableStop {
|
||||
|
||||
Reference in New Issue
Block a user