Public Member Functions | Data Fields | Private Attributes

GenericScopeResolver Struct Reference

Scope resolver for generic objects and properties. More...

Inheritance diagram for GenericScopeResolver:
ScopeResolver

Public Member Functions

 GenericScopeResolver (ResolverObject &ro, bool ai_callback)
 Generic scope resolver.
uint32 GetVariable (byte variable, uint32 parameter, bool *available) const
 Get a variable value.

Data Fields

CargoID cargo_type
uint8 default_selection
uint8 src_industry
 Source industry substitute type. 0xFF for "town", 0xFE for "unknown".
uint8 dst_industry
 Destination industry substitute type. 0xFF for "town", 0xFE for "unknown".
uint8 distance
AIConstructionEvent event
uint8 count
uint8 station_size

Private Attributes

bool ai_callback
 Callback comes from the AI.

Detailed Description

Scope resolver for generic objects and properties.

Definition at line 22 of file newgrf_generic.cpp.


Constructor & Destructor Documentation

GenericScopeResolver::GenericScopeResolver ( ResolverObject ro,
bool  ai_callback 
)

Generic scope resolver.

Parameters:
ro Surrounding resolver.
ai_callback Callback comes from the AI.

Definition at line 151 of file newgrf_generic.cpp.

References dst_industry, and src_industry.


Member Function Documentation

uint32 GenericScopeResolver::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 103 of file newgrf_generic.cpp.

References ai_callback, CargoSpec::bitnum, GRFFile::cargo_map, DEBUG, dst_industry, CargoSpec::Get(), ResolverObject::grffile, ScopeResolver::ro, and src_industry.


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