| OpenTTD
    | 
Scope resolver for generic objects and properties. More...
 
  
 | 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. | |
|  Public Member Functions inherited from ScopeResolver | |
| ScopeResolver (ResolverObject &ro) | |
| virtual uint32 | GetRandomBits () const | 
| Get a few random bits. | |
| virtual uint32 | GetTriggers () const | 
| Get the triggers. | |
| virtual void | SetTriggers (int triggers) const | 
| Set the triggers. | |
| virtual void | StorePSA (uint reg, int32 value) | 
| Store a value into the persistent storage area (PSA). | |
| 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 | 
|  Data Fields inherited from ScopeResolver | |
| ResolverObject & | ro | 
| Surrounding resolver object. | |
| Private Attributes | |
| bool | ai_callback | 
| Callback comes from the AI. | |
Scope resolver for generic objects and properties.
Definition at line 24 of file newgrf_generic.cpp.
| GenericScopeResolver::GenericScopeResolver | ( | ResolverObject & | ro, | 
| bool | ai_callback | ||
| ) | 
Generic scope resolver.
| ro | Surrounding resolver. | 
| ai_callback | Callback comes from the AI. | 
Definition at line 153 of file newgrf_generic.cpp.
References ai_callback, dst_industry, and src_industry.
| 
 | 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 105 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.
 1.8.1.2
 1.8.1.2