#include <station_type.h>
Public Member Functions | |
StationFinder (TileIndex t, int dx, int dy) | |
Constructs StationFinder. | |
const StationList * | GetStations () |
Run a tile loop to find stations around a tile, on demand. | |
Private Attributes | |
StationList | stations |
List of stations nearby. | |
TileIndex | tile |
Northern tile of producer, INVALID_TILE when # stations is valid. | |
int | x_extent |
Width of producer. | |
int | y_extent |
Height of producer. |
The list is created upon first call to GetStations()
Definition at line 142 of file station_type.h.
StationFinder::StationFinder | ( | TileIndex | t, | |
int | dx, | |||
int | dy | |||
) | [inline] |
Constructs StationFinder.
t | northern tile | |
dx | width of producer | |
dy | height of producer |
Definition at line 154 of file station_type.h.
const StationList * StationFinder::GetStations | ( | ) |
Run a tile loop to find stations around a tile, on demand.
Cache the result for further requests
Definition at line 2985 of file station_cmd.cpp.
References FindStationsAroundTiles(), INVALID_TILE, stations, x_extent, and y_extent.
Referenced by TileLoop_Town().