mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
fix: station stats spawn count regions
This commit is contained in:
@@ -160,6 +160,8 @@ export default defineComponent({
|
|||||||
spawnCount() {
|
spawnCount() {
|
||||||
return this.mainStore.activeSceneryList.reduce(
|
return this.mainStore.activeSceneryList.reduce(
|
||||||
(acc, scenery) => {
|
(acc, scenery) => {
|
||||||
|
if (scenery.region != this.mainStore.region.id) return acc;
|
||||||
|
|
||||||
scenery.spawns.forEach((spawn) => {
|
scenery.spawns.forEach((spawn) => {
|
||||||
if (/EZT|POS|OSOB/i.test(spawn.spawnName)) acc['passenger'] += 1;
|
if (/EZT|POS|OSOB/i.test(spawn.spawnName)) acc['passenger'] += 1;
|
||||||
if (/TOW/i.test(spawn.spawnName)) acc['freight'] += 1;
|
if (/TOW/i.test(spawn.spawnName)) acc['freight'] += 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user