fix: station stats spawn count regions

This commit is contained in:
2024-05-16 23:42:35 +02:00
parent 9a5fd4d670
commit d91d4cc6a8
@@ -160,6 +160,8 @@ export default defineComponent({
spawnCount() {
return this.mainStore.activeSceneryList.reduce(
(acc, scenery) => {
if (scenery.region != this.mainStore.region.id) return acc;
scenery.spawns.forEach((spawn) => {
if (/EZT|POS|OSOB/i.test(spawn.spawnName)) acc['passenger'] += 1;
if (/TOW/i.test(spawn.spawnName)) acc['freight'] += 1;