mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
chore: checkpoints filtering
This commit is contained in:
@@ -251,10 +251,11 @@ export const useMainStore = defineStore('mainStore', {
|
|||||||
if (!scheduledTrains) return;
|
if (!scheduledTrains) return;
|
||||||
|
|
||||||
scheduledTrains.forEach(({ train, checkpointStop }) => {
|
scheduledTrains.forEach(({ train, checkpointStop }) => {
|
||||||
|
scenery.scheduledTrains.push({ train, checkpointStop });
|
||||||
|
|
||||||
if (uniqueTrainIds.includes(train.id) || train.region != this.region.id) return;
|
if (uniqueTrainIds.includes(train.id) || train.region != this.region.id) return;
|
||||||
|
|
||||||
scenery.scheduledTrainCount.all += 1;
|
scenery.scheduledTrainCount.all += 1;
|
||||||
scenery.scheduledTrains.push({ train, checkpointStop });
|
|
||||||
|
|
||||||
if (checkpointStop.confirmed) scenery.scheduledTrainCount.confirmed++;
|
if (checkpointStop.confirmed) scenery.scheduledTrainCount.confirmed++;
|
||||||
else scenery.scheduledTrainCount.unconfirmed++;
|
else scenery.scheduledTrainCount.unconfirmed++;
|
||||||
|
|||||||
Reference in New Issue
Block a user