MinchinWeb's MetaLibrary  v.9
Library functions of OpenTTD AI writers.
_MinchinWeb_Industry_ Class Reference

Industries. More...

Static Public Member Functions

function GetIndustryID (Tile)
 Get the IndustryID of the industry at a given TileID. More...
 

Private Attributes

 main = null
 

Detailed Description

Industries.

Version
v.1 (2012-01-12)
Author
W. Minchin (MinchinWeb)
Since
MetaLibrary v.2

These are functions relating to dealing with OpenTTD industries.

Definition at line 25 of file Industry.nut.

Member Function Documentation

function _MinchinWeb_Industry_::GetIndustryID ( Tile  )
static

Get the IndustryID of the industry at a given TileID.

Parameters
TileTileID to start the search from
Returns
IndustryID of the industry at (or around) TileID.
Constants.InvalidIndustry() if no valid industries can be found.
Note
AIIndustry.GetIndustryID( AIIndustry.GetLocation( IndustryID ) ) sometimes fails because GetLocation() returns the northmost tile of the industry which may be a dock, heliport, or not part of the industry at all.
This function starts at the northmost tile, and then searches a square out (up to Constants.StationSize() ) until it finds a tile with a valid IndustryID.

Definition at line 48 of file Industry.nut.

Member Data Documentation

_MinchinWeb_Industry_::main = null
private

Definition at line 26 of file Industry.nut.


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