Naprawiono liczbę rozkładów dla scenerii

This commit is contained in:
2021-10-08 19:53:31 +02:00
parent 9bf1cb4735
commit f566d2e108
4 changed files with 18 additions and 15 deletions
+4 -2
View File
@@ -264,7 +264,7 @@ export const store = createStore<State>({
noCatenary: station[13] as number
}
},
checkpoints: station[14] ? (station[14] as string[]).map(sub => ({ checkpointName: sub, scheduledTrains: [] })) : null,
checkpoints: station[14] ? (station[14] as string[]).map(sub => ({ checkpointName: sub, scheduledTrains: [] })) : [],
stops: station[15] as string[],
default: station[16] as boolean,
@@ -385,9 +385,11 @@ export const store = createStore<State>({
if (stopName.includes(stationName) && !stop.stopName.includes("po.") && !stop.stopName.includes("podg.")) return true;
if (stationName.includes(stopName) && !stop.stopName.includes("po.") && !stop.stopName.includes("podg.")) return true;
if (stopName.includes("podg.") && stopName.split(", podg.")[0] && stationName.includes(stopName.split(", podg.")[0])) return true;
// if (stationName)
// if (station.stops && station.stops.includes(stop.stopNameRAW)) return true;
if (station.checkpoints.length > 0 && station.checkpoints.some(cp => cp.checkpointName.includes(stop.stopNameRAW))) return true;
return false;
});