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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/station_base.h b/src/station_base.h
index 7f2303b0a..6cd60094e 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -77,6 +77,8 @@ struct StationRect : public Rect {
StationRect& operator = (Rect src);
};
+typedef SmallVector<Industry *, 2> IndustryVector;
+
/** Station data structure */
struct Station : StationPool::PoolItem<&_station_pool> {
public:
@@ -132,6 +134,8 @@ public:
std::list<Vehicle *> loading_vehicles;
GoodsEntry goods[NUM_CARGO]; ///< Goods at this station
+ IndustryVector industries_near; ///< Cached list of industries near the station that can accept cargo, @see DeliverGoodsToIndustry()
+
uint16 random_bits;
byte waiting_triggers;
uint8 cached_anim_triggers; ///< Combined animation trigger bitmask, used to determine if trigger processing should happen.
@@ -161,6 +165,9 @@ public:
uint GetPlatformLength(TileIndex tile) const;
bool IsBuoy() const;
+ void RecomputeIndustriesNear();
+ static void RecomputeIndustriesNearForAll();
+
uint GetCatchmentRadius() const;
static FORCEINLINE Station *GetByTile(TileIndex tile)