Public Types | |
enum | CargoAcceptState { CAS_NOT_ACCEPTED, CAS_ACCEPTED, CAS_TEMP_REFUSED } |
Ways for an industry to accept a cargo. More... | |
Static Public Member Functions | |
static int32 | GetIndustryCount () |
Gets the number of industries. | |
static bool | IsValidIndustry (IndustryID industry_id) |
Checks whether the given industry index is valid. | |
static IndustryID | GetIndustryID (TileIndex tile) |
Get the IndustryID of a tile, if there is an industry. | |
static char * | GetName (IndustryID industry_id) |
Get the name of the industry. | |
static CargoAcceptState | IsCargoAccepted (IndustryID industry_id, CargoID cargo_id) |
See whether an industry currently accepts a certain cargo. | |
static int32 | GetStockpiledCargo (IndustryID industry_id, CargoID cargo_id) |
Get the amount of cargo stockpiled for processing. | |
static int32 | GetLastMonthProduction (IndustryID industry_id, CargoID cargo_id) |
Get the total last month's production of the given cargo at an industry. | |
static int32 | GetLastMonthTransported (IndustryID industry_id, CargoID cargo_id) |
Get the total amount of cargo transported from an industry last month. | |
static int32 | GetLastMonthTransportedPercentage (IndustryID industry_id, CargoID cargo_id) |
Get the percentage of cargo transported from an industry last month. | |
static TileIndex | GetLocation (IndustryID industry_id) |
Gets the location of the industry. | |
static int32 | GetAmountOfStationsAround (IndustryID industry_id) |
Get the number of stations around an industry. | |
static int32 | GetDistanceManhattanToTile (IndustryID industry_id, TileIndex tile) |
Get the manhattan distance from the tile to the GSIndustry::GetLocation() of the industry. | |
static int32 | GetDistanceSquareToTile (IndustryID industry_id, TileIndex tile) |
Get the square distance from the tile to the GSIndustry::GetLocation() of the industry. | |
static bool | IsBuiltOnWater (IndustryID industry_id) |
Is this industry built on water. | |
static bool | HasHeliport (IndustryID industry_id) |
Does this industry have a heliport? | |
static TileIndex | GetHeliportLocation (IndustryID industry_id) |
Gets the location of the industry's heliport. | |
static bool | HasDock (IndustryID industry_id) |
Does this industry have a dock? | |
static TileIndex | GetDockLocation (IndustryID industry_id) |
Gets the location of the industry's dock. | |
static IndustryType | GetIndustryType (IndustryID industry_id) |
Get the IndustryType of the industry. |
static int32 GSIndustry::GetIndustryCount | ( | ) | [static] |
Gets the number of industries.
static bool GSIndustry::IsValidIndustry | ( | IndustryID | industry_id | ) | [static] |
Checks whether the given industry index is valid.
industry_id | The index to check. |
static IndustryID GSIndustry::GetIndustryID | ( | TileIndex | tile | ) | [static] |
Get the IndustryID of a tile, if there is an industry.
tile | The tile to find the IndustryID of. |
static char* GSIndustry::GetName | ( | IndustryID | industry_id | ) | [static] |
Get the name of the industry.
industry_id | The industry to get the name of. |
static CargoAcceptState GSIndustry::IsCargoAccepted | ( | IndustryID | industry_id, | |
CargoID | cargo_id | |||
) | [static] |
See whether an industry currently accepts a certain cargo.
industry_id | The index of the industry. | |
cargo_id | The index of the cargo. |
GSCargo::IsValidCargo(cargo_id).
static int32 GSIndustry::GetStockpiledCargo | ( | IndustryID | industry_id, | |
CargoID | cargo_id | |||
) | [static] |
Get the amount of cargo stockpiled for processing.
industry_id | The index of the industry. | |
cargo_id | The index of the cargo. |
GSCargo::IsValidCargo(cargo_id).
static int32 GSIndustry::GetLastMonthProduction | ( | IndustryID | industry_id, | |
CargoID | cargo_id | |||
) | [static] |
Get the total last month's production of the given cargo at an industry.
industry_id | The index of the industry. | |
cargo_id | The index of the cargo. |
GSCargo::IsValidCargo(cargo_id).
static int32 GSIndustry::GetLastMonthTransported | ( | IndustryID | industry_id, | |
CargoID | cargo_id | |||
) | [static] |
Get the total amount of cargo transported from an industry last month.
industry_id | The index of the industry. | |
cargo_id | The index of the cargo. |
GSCargo::IsValidCargo(cargo_id).
static int32 GSIndustry::GetLastMonthTransportedPercentage | ( | IndustryID | industry_id, | |
CargoID | cargo_id | |||
) | [static] |
Get the percentage of cargo transported from an industry last month.
industry_id | The index of the industry. | |
cargo_id | The index of the cargo. |
GSCargo::IsValidCargo(cargo_id).
static TileIndex GSIndustry::GetLocation | ( | IndustryID | industry_id | ) | [static] |
Gets the location of the industry.
industry_id | The index of the industry. |
static int32 GSIndustry::GetAmountOfStationsAround | ( | IndustryID | industry_id | ) | [static] |
Get the number of stations around an industry.
All stations that can service the industry are counted, your own stations but also your opponents stations.
industry_id | The index of the industry. |
static int32 GSIndustry::GetDistanceManhattanToTile | ( | IndustryID | industry_id, | |
TileIndex | tile | |||
) | [static] |
Get the manhattan distance from the tile to the GSIndustry::GetLocation() of the industry.
industry_id | The industry to get the distance to. | |
tile | The tile to get the distance to. |
GSMap::IsValidTile(tile).
static int32 GSIndustry::GetDistanceSquareToTile | ( | IndustryID | industry_id, | |
TileIndex | tile | |||
) | [static] |
Get the square distance from the tile to the GSIndustry::GetLocation() of the industry.
industry_id | The industry to get the distance to. | |
tile | The tile to get the distance to. |
GSMap::IsValidTile(tile).
static bool GSIndustry::IsBuiltOnWater | ( | IndustryID | industry_id | ) | [static] |
Is this industry built on water.
industry_id | The index of the industry. |
static bool GSIndustry::HasHeliport | ( | IndustryID | industry_id | ) | [static] |
Does this industry have a heliport?
industry_id | The index of the industry. |
static TileIndex GSIndustry::GetHeliportLocation | ( | IndustryID | industry_id | ) | [static] |
Gets the location of the industry's heliport.
industry_id | The index of the industry. |
HasHeliport(industry_id).
static bool GSIndustry::HasDock | ( | IndustryID | industry_id | ) | [static] |
Does this industry have a dock?
industry_id | The index of the industry. |
static TileIndex GSIndustry::GetDockLocation | ( | IndustryID | industry_id | ) | [static] |
Gets the location of the industry's dock.
industry_id | The index of the industry. |
HasDock(industry_id).
static IndustryType GSIndustry::GetIndustryType | ( | IndustryID | industry_id | ) | [static] |
Get the IndustryType of the industry.
industry_id | The index of the industry. |