OpenTTD Source: IndustryTileScopeResolver Struct Reference

OpenTTD Source 12.2

Public Member Functions | Data Fields
IndustryTileScopeResolver Struct Reference

Resolver for the industry tiles scope. More...

`#include <newgrf_industrytiles.h>`

Inheritance diagram for IndustryTileScopeResolver:

## Public Member Functions
| IndustryTileScopeResolver (ResolverObject &ro, Industry *industry, TileIndex tile)
| Constructor of the scope resolver for the industry tile. More...
uint32 | GetRandomBits () const override
| Get a few random bits. More...
uint32 | GetVariable (byte variable, uint32 parameter, bool *available) const override
| Get a variable value. More...
uint32 | GetTriggers () const override
| Get the triggers. More...
Public Member Functions inherited from ScopeResolver
| ScopeResolver (ResolverObject &ro)
virtual void | StorePSA (uint reg, int32 value)
| Store a value into the persistent storage area (PSA). More...

## Data Fields
Industry * | industry
| Industry owning the tiles.
TileIndex | tile
| Tile being resolved.
Data Fields inherited from ScopeResolver
ResolverObject & | ro
| Surrounding resolver object.

## Detailed Description

Resolver for the industry tiles scope.

Definition at line 18 of file newgrf_industrytiles.h.

## Constructor & Destructor Documentation

## ◆ IndustryTileScopeResolver()

IndustryTileScopeResolver::IndustryTileScopeResolver | ( | ResolverObject & | ro,
|  | Industry * | industry,
|  | TileIndex | tile
| ) |  |
| inline

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 28 of file newgrf_industrytiles.h.

## Member Function Documentation

## ◆ GetRandomBits()

uint32 IndustryTileScopeResolver::GetRandomBits | ( |  | ) | const
| overridevirtual

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 Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, industry, IsValidTile(), and tile.

## ◆ GetTriggers()

uint32 IndustryTileScopeResolver::GetTriggers | ( |  | ) | const
| overridevirtual

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 Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, industry, IsValidTile(), and tile.

## ◆ GetVariable()

uint32 IndustryTileScopeResolver::GetVariable | ( | byte | variable,
|  | uint32 | parameter,
|  | bool * | available
| ) |  | const
| overridevirtual

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(), GetAnimationFrame(), GetIndustryConstructionStage(), GetNearbyIndustryTileInformation(), GetRelativePosition(), GetTerrainType(), GetTownRadiusGroup(), industry, IsTileType(), Industry::location, MP_INDUSTRY, OrthogonalTileArea::tile, and tile.

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

- src/newgrf_industrytiles.h
- src/newgrf_industrytiles.cpp