Public Member Functions | Data Fields

IndustryTileScopeResolver Struct Reference

Resolver for the industry tiles scope. More...

#include <newgrf_industrytiles.h>

Inheritance diagram for IndustryTileScopeResolver:
ScopeResolver

Public Member Functions

 IndustryTileScopeResolver (ResolverObject &ro, Industry *industry, TileIndex tile)
 Constructor of the scope resolver for the industry tile.
uint32 GetRandomBits () const
 Get a few random bits.
uint32 GetVariable (byte variable, uint32 parameter, bool *available) const
 Get a variable value.
uint32 GetTriggers () const
 Get the triggers.
void SetTriggers (int triggers) const
 Set the triggers.

Data Fields

Industryindustry
 Industry owning the tiles.
TileIndex tile
 Tile being resolved.

Detailed Description

Resolver for the industry tiles scope.

Definition at line 20 of file newgrf_industrytiles.h.


Constructor & Destructor Documentation

IndustryTileScopeResolver::IndustryTileScopeResolver ( ResolverObject ro,
Industry industry,
TileIndex  tile 
)

Constructor of the scope resolver for the industry tile.

Parameters:
ro Surrounding resolver.
industry Industry owning the tile.
tile Tile of the industry.

Definition at line 158 of file newgrf_industrytiles.cpp.


Member Function Documentation

uint32 IndustryTileScopeResolver::GetRandomBits (  )  const [virtual]

Get a few random bits.

Default implementation has no random bits.

Returns:
Random bits.

Reimplemented from ScopeResolver.

Definition at line 102 of file newgrf_industrytiles.cpp.

References GetIndustryRandomBits(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, industry, IsTileType(), IsValidTile(), MP_INDUSTRY, and tile.

uint32 IndustryTileScopeResolver::GetTriggers (  )  const [virtual]

Get the triggers.

Base class returns 0 to prevent trouble.

Returns:
The triggers.

Reimplemented from ScopeResolver.

Definition at line 110 of file newgrf_industrytiles.cpp.

References GetIndustryTriggers(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, industry, IsTileType(), IsValidTile(), MP_INDUSTRY, and tile.

uint32 IndustryTileScopeResolver::GetVariable ( byte  variable,
uint32  parameter,
bool *  available 
) const [virtual]

Get a variable value.

Default implementation has no available variables.

Parameters:
variable Variable to read
parameter Parameter for 60+x variables
[out] available Set to false, in case the variable does not exist.
Returns:
Value

Reimplemented from ScopeResolver.

Definition at line 61 of file newgrf_industrytiles.cpp.

References ClosestTownFromTile(), DEBUG, GetAnimationFrame(), Industry::GetByTile(), GetIndustryConstructionStage(), GetIndustryIDAtOffset(), GetNearbyIndustryTileInformation(), GetNearbyTile(), GetRelativePosition(), GetTerrainType(), GetTownRadiusGroup(), ResolverObject::grffile, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, industry, IsTileType(), Industry::location, MP_INDUSTRY, ScopeResolver::ro, TileArea::tile, and tile.

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

Set the triggers.

Base class implementation does nothing.

Parameters:
triggers Triggers to set.

Reimplemented from ScopeResolver.

Definition at line 118 of file newgrf_industrytiles.cpp.

References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, industry, IsTileType(), IsValidTile(), MP_INDUSTRY, SetIndustryTriggers(), and tile.


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