Public Member Functions | Data Fields

StationScopeResolver Struct Reference

Scope resolver for stations. More...

#include <newgrf_station.h>

Inheritance diagram for StationScopeResolver:
ScopeResolver

Public Member Functions

 StationScopeResolver (ResolverObject &ro, const StationSpec *statspec, BaseStation *st, TileIndex tile)
 Constructor for station scopes.
uint32 GetRandomBits () const
 Get a few random bits.
uint32 GetTriggers () const
 Get the triggers.
void SetTriggers (int triggers) const
 Set the triggers.
uint32 GetVariable (byte variable, uint32 parameter, bool *available) const
 Get a variable value.

Data Fields

TileIndex tile
 Tile of the station.
struct BaseStationst
 Instance of the station.
struct StationSpecstatspec
 Station (type) specification.
CargoID cargo_type
 Type of cargo of the station.
Axis axis
 Station axis, used only for the slope check callback.

Detailed Description

Scope resolver for stations.

Definition at line 26 of file newgrf_station.h.


Constructor & Destructor Documentation

StationScopeResolver::StationScopeResolver ( ResolverObject ro,
const StationSpec statspec,
BaseStation st,
TileIndex  tile 
)

Constructor for station scopes.

Parameters:
ro Surrounding resolver.
statspec Station (type) specification.
st Instance of the station.
tile Tile of the station.

Definition at line 593 of file newgrf_station.cpp.


Member Function Documentation

uint32 StationScopeResolver::GetRandomBits (  )  const [virtual]

Get a few random bits.

Default implementation has no random bits.

Returns:
Random bits.

Reimplemented from ScopeResolver.

Definition at line 224 of file newgrf_station.cpp.

References GetStationTileRandomBits(), INVALID_TILE, BaseStation::random_bits, and st.

uint32 StationScopeResolver::GetTriggers (  )  const [virtual]

Get the triggers.

Base class returns 0 to prevent trouble.

Returns:
The triggers.

Reimplemented from ScopeResolver.

Definition at line 230 of file newgrf_station.cpp.

References st, and BaseStation::waiting_triggers.

void StationScopeResolver::SetTriggers ( int  triggers  )  const [virtual]

Set the triggers.

Base class implementation does nothing.

Parameters:
triggers Triggers to set.

Reimplemented from ScopeResolver.

Definition at line 236 of file newgrf_station.cpp.

References st, and BaseStation::waiting_triggers.


The documentation for this struct was generated from the following files: