diff options
Diffstat (limited to 'src/base_station_base.h')
-rw-r--r-- | src/base_station_base.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/base_station_base.h b/src/base_station_base.h index a4cbb2fc0..407370260 100644 --- a/src/base_station_base.h +++ b/src/base_station_base.h @@ -94,6 +94,17 @@ struct BaseStation : StationPool::PoolItem<&_station_pool> { { return BaseStation::Get(GetStationIndex(tile)); } + + /** + * Check whether the base station currently is in use; in use means + * that it is not scheduled for deletion and that it still has some + * facilities left. + * @return true if still in use + */ + FORCEINLINE bool IsInUse() const + { + return (this->facilities & ~FACIL_WAYPOINT) != 0; + } }; #define FOR_ALL_BASE_STATIONS(var) FOR_ALL_ITEMS_FROM(BaseStation, station_index, var, 0) |