diff --git a/src/App.vue b/src/App.vue index d7906b1..ca991fa 100644 --- a/src/App.vue +++ b/src/App.vue @@ -38,7 +38,7 @@ @@ -59,7 +59,7 @@ export default class App extends Vue { @Action("synchronizeData") synchronizeData; @Getter("getAllData") data; - private VERSION = "1.3.5"; + private VERSION = "1.3.6"; async mounted() { this.synchronizeData(); diff --git a/src/data/stationData.json b/src/data/stationData.json index 674e93c..b466a7b 100644 --- a/src/data/stationData.json +++ b/src/data/stationData.json @@ -197,5 +197,6 @@ ["Buskowo Zdrój", "https://td2.info.pl/scenerie/buskowo-zdroj/", "", null, "4", "NIE", "mieszana", "mechaniczne", "", "", 1, 0, 0, 0, null, null, false, false, false], ["Bełchów", "https://td2.info.pl/scenerie/belchow-projekt-lka/", "11", "ŁKA", "2", "NIE", "współczesna", "SPK", "", "TAK", 0, 0, 2, 0, null, null, false, false, false], ["Modlinków", "https://td2.info.pl/scenerie/podg-modlinkow/", "", null, "6", "NIE", "współczesna", "SPK", "", "TAK", 3, 0, 2, 0, null, null, false, false, false], - ["Arkadia Zdrój 2019", "https://td2.info.pl/scenerie/arkadia-zdroj-2016/", "", null, "", "NIE", "współczesna", "SCS", "TAK (szlak wewn.)", "TAK", 1, 0, 2, 0, null, null, false, false, false] + ["Arkadia Zdrój 2019", "https://td2.info.pl/scenerie/arkadia-zdroj-2016/", "", null, "", "NIE", "współczesna", "SCS", "TAK (szlak wewn.)", "TAK", 1, 0, 2, 0, null, null, false, false, false], + ["Łaskarzew", "https://td2.info.pl/scenerie/laskarzew-6516/", "7", null, "0", "NIE", "współczesna", "SPK", "", "TAK", 0, 0, 2, 0, null, null, false, false, false] ] diff --git a/src/scripts/stationFilterManager.ts b/src/scripts/stationFilterManager.ts index 0cc5d1a..d424fff 100644 --- a/src/scripts/stationFilterManager.ts +++ b/src/scripts/stationFilterManager.ts @@ -42,6 +42,7 @@ export default class StationFilterManager { if (station.default && this.filters['default']) return false; if (!station.default && this.filters['notDefault']) return false; + if (station.reqLevel == '-1') return true; if (parseInt(station.reqLevel) < this.filters['minLevel']) return false; if (this.filters['no-1track'] && (station.routes.oneWay.catenary != 0 || station.routes.oneWay.noCatenary != 0)) return false; diff --git a/src/store/store.ts b/src/store/store.ts index 53ea121..fc57b63 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -412,13 +412,11 @@ export default class Store extends VuexModule { return acc; }, [] as Station[]); - // Dodawanie do listy online potencjalnych scenerii niewpisanych do bazy - updatedStationList.forEach(updatedStation => { - const alreadyInList: any = this.stationList.some(station => station.stationName === updatedStation.stationName); - - if (!alreadyInList) { + updatedStationList + .filter(uStation => !this.stationList.some(station => uStation.stationName === station.stationName)) + .forEach(uStation => { this.stationList.push({ - ...updatedStation, + ...uStation, scheduledTrains: [], stationTrains: [], subStations: [], @@ -426,8 +424,26 @@ export default class Store extends VuexModule { reqLevel: '-1', nonPublic: true, }); - } - }); + }); + + // Dodawanie do listy online potencjalnych scenerii niewpisanych do bazy + // updatedStationList.forEach(updatedStation => { + // const alreadyInList: any = this.stationList.some(station => station.stationName === updatedStation.stationName); + + // console.log(updatedStation, alreadyInList); + + // if (!alreadyInList) { + // this.stationList.push({ + // ...updatedStation, + // scheduledTrains: [], + // stationTrains: [], + // subStations: [], + // online: true, + // reqLevel: '-1', + // nonPublic: true, + // }); + // } + // }); this.stationCount = this.stationList.filter(station => station.online).length; this.dataConnectionStatus = Status.Loaded; @@ -574,15 +590,6 @@ export default class Store extends VuexModule { stopStatusID = 3; } - // for (let i = stopInfoIndex; i < data.followingStops.length - 1; i++){ - // const stop = data.followingStops[i]; - - // if (stop.mainStop && stop.stopType.includes("ph")) { - // nearestStop = stop.stopNameRAW; - // break; - // } - // } - checkpoint.scheduledTrains.push({ trainNo: data.trainNo, driverName: data.driverName,