OpenTTD Source
20241108-master-g80f628063a
|
Base classes/functions for stations. More...
#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 | 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. More... | |
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.
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 funcion 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 564 of file station_base.h.
References _settings_game, CA_UNMODIFIED, OrthogonalTileArea::Expand(), SpecializedStation< Station, false >::GetIfValid(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_station_pool >::GetNumItems(), GetStationIndex(), Station::industry, IsTileType(), MAX_CATCHMENT, StationSettings::modified_catchment, MP_STATION, StationSettings::serve_neutral_industries, and GameSettings::station.
Referenced by PopulateStationsNearby().