From 3ed2c0918478dd6680b43d0fd61e502f8138243a Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 19 May 2024 23:05:57 +0200 Subject: [PATCH] chore: checkpoints filtering --- src/store/mainStore.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/mainStore.ts b/src/store/mainStore.ts index 8f56076..a4a9c33 100644 --- a/src/store/mainStore.ts +++ b/src/store/mainStore.ts @@ -251,10 +251,11 @@ export const useMainStore = defineStore('mainStore', { if (!scheduledTrains) return; scheduledTrains.forEach(({ train, checkpointStop }) => { + scenery.scheduledTrains.push({ train, checkpointStop }); + if (uniqueTrainIds.includes(train.id) || train.region != this.region.id) return; scenery.scheduledTrainCount.all += 1; - scenery.scheduledTrains.push({ train, checkpointStop }); if (checkpointStop.confirmed) scenery.scheduledTrainCount.confirmed++; else scenery.scheduledTrainCount.unconfirmed++;