|
OpenTTD Source 20251117-master-g7398d2e290
|
Base classes/functions for stations. More...
#include "core/flatset_type.hpp"#include "core/random_func.hpp"#include "base_station_base.h"#include "newgrf_airport.h"#include "cargopacket.h"#include "industry_type.h"#include "linkgraph/linkgraph_type.h"#include "newgrf_storage.h"#include "bitmap_type.h"Go to the source code of this file.
Data Structures | |
| class | FlowStat |
| Flow statistics telling how much flow should be sent along a link. More... | |
| class | FlowStatMap |
| Flow descriptions by origin stations. More... | |
| struct | GoodsEntry |
| Stores station stats for a single cargo. More... | |
| struct | GoodsEntry::GoodsEntryData |
| struct | Airport |
| All airport-related information. More... | |
| struct | IndustryListEntry |
| struct | IndustryCompare |
| struct | Station |
| Station data structure. More... | |
| class | AirportTileIterator |
| Iterator to iterate over all tiles belonging to an airport. More... | |
Typedefs | |
| typedef std::set< IndustryListEntry, IndustryCompare > | IndustryList |
Functions | |
| void | RebuildStationKdtree () |
| template<typename Func > | |
| void | ForAllStationsAroundTiles (const TileArea &ta, Func func) |
| Call a function on all stations that have any part of the requested area within their catchment. | |
Variables | |
| static const uint8_t | INITIAL_STATION_RATING = 175 |
| static const uint8_t | MAX_STATION_RATING = 255 |
Base classes/functions for stations.
Definition in file station_base.h.
| typedef std::set<IndustryListEntry, IndustryCompare> IndustryList |
Definition at line 497 of file station_base.h.
| void ForAllStationsAroundTiles | ( | const TileArea & | ta, |
| Func | func | ||
| ) |
Call a function on all stations that have any part of the requested area within their catchment.
| Func | The type of function to call |
| area | The TileArea to check |
| func | The function to call, must take two parameters: Station* and TileIndex and return true if coverage of that tile is acceptable for a given station or false if search should continue |
Definition at line 625 of file station_base.h.
References _settings_game, CA_UNMODIFIED, OrthogonalTileArea::Expand(), SpecializedStation< Station, false >::GetIfValid(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_station_pool >::GetNumItems(), GetStationIndex(), Station::industry, FlatSet< Tkey, Tcompare >::insert(), IsTileType(), MAX_CATCHMENT, StationSettings::modified_catchment, MP_STATION, StationSettings::serve_neutral_industries, and GameSettings::station.
Referenced by StationFinder::GetStations(), MakeTownHouse(), and PopulateStationsNearby().
| void RebuildStationKdtree | ( | ) |
Definition at line 42 of file station.cpp.
|
static |
Definition at line 23 of file station_base.h.
|
static |
Definition at line 24 of file station_base.h.