summaryrefslogtreecommitdiff
path: root/src/station_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_base.h')
-rw-r--r--src/station_base.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/station_base.h b/src/station_base.h
index d1e62f614..a48daa653 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -19,6 +19,7 @@
#include "industry_type.h"
#include "linkgraph/linkgraph_type.h"
#include "newgrf_storage.h"
+#include "bitmap_type.h"
#include <map>
#include <set>
@@ -467,6 +468,8 @@ public:
IndustryType indtype; ///< Industry type to get the name from
+ BitmapTileArea catchment_tiles; ///< NOSAVE: Set of individual tiles covered by catchment area
+
StationHadVehicleOfTypeByte had_vehicle_of_type;
byte time_since_load;
@@ -493,11 +496,18 @@ public:
/* virtual */ uint GetPlatformLength(TileIndex tile, DiagDirection dir) const;
/* virtual */ uint GetPlatformLength(TileIndex tile) const;
- void RecomputeIndustriesNear();
- static void RecomputeIndustriesNearForAll();
+ void RecomputeCatchment();
+ static void RecomputeCatchmentForAll();
uint GetCatchmentRadius() const;
Rect GetCatchmentRect() const;
+ bool CatchmentCoversTown(TownID t) const;
+ void RemoveFromAllNearbyLists();
+
+ inline bool TileIsInCatchment(TileIndex tile) const
+ {
+ return this->catchment_tiles.HasTile(tile);
+ }
/* virtual */ inline bool TileBelongsToRailStation(TileIndex tile) const
{