OpenTTD
|
Scope resolver for stations. More...
#include <newgrf_station.h>
Public Member Functions | |
StationScopeResolver (ResolverObject &ro, const StationSpec *statspec, BaseStation *st, TileIndex tile) | |
Constructor for station scopes. More... | |
uint32 | GetRandomBits () const |
Get a few random bits. More... | |
uint32 | GetTriggers () const |
Get the triggers. More... | |
uint32 | GetVariable (byte variable, uint32 parameter, bool *available) const |
Get a variable value. More... | |
![]() | |
ScopeResolver (ResolverObject &ro) | |
virtual void | StorePSA (uint reg, int32 value) |
Store a value into the persistent storage area (PSA). More... | |
Data Fields | |
TileIndex | tile |
Tile of the station. | |
struct BaseStation * | st |
Instance of the station. | |
const struct StationSpec * | statspec |
Station (type) specification. | |
CargoID | cargo_type |
Type of cargo of the station. | |
Axis | axis |
Station axis, used only for the slope check callback. | |
![]() | |
ResolverObject & | ro |
Surrounding resolver object. | |
Scope resolver for stations.
Definition at line 26 of file newgrf_station.h.
|
inline |
Constructor for station scopes.
ro | Surrounding resolver. |
statspec | Station (type) specification. |
st | Instance of the station. |
tile | Tile of the station. |
Definition at line 40 of file newgrf_station.h.
References GetRandomBits(), GetTriggers(), and GetVariable().
|
virtual |
Get a few random bits.
Default implementation has no random bits.
Reimplemented from ScopeResolver.
Definition at line 226 of file newgrf_station.cpp.
References GetStationTileRandomBits(), and INVALID_TILE.
Referenced by StationScopeResolver().
|
virtual |
Get the triggers.
Base class returns 0
to prevent trouble.
Reimplemented from ScopeResolver.
Definition at line 232 of file newgrf_station.cpp.
Referenced by StationScopeResolver().
|
virtual |
Get a variable value.
Default implementation has no available variables.
variable | Variable to read | |
parameter | Parameter for 60+x variables | |
[out] | available | Set to false, in case the variable does not exist. |
Reimplemented from ScopeResolver.
Definition at line 273 of file newgrf_station.cpp.
References _current_company, AXIS_Y, GetCompanyInfo(), GetNearbyTile(), GetTileSlope(), HasBit(), INVALID_AXIS, INVALID_TILE, and OrthogonalTileArea::tile.
Referenced by StationScopeResolver().