Class that handles all industry-type related functions.
More...
Detailed Description
Class that handles all industry-type related functions.
Member Function Documentation
Build an industry of the specified type.
- Parameters:
-
| industry_type | The type of the industry to build. |
| tile | The tile to build the industry on. |
- Precondition:
- CanBuildIndustry(industry_type).
- Returns:
- True if the industry was succesfully build.
static bool AIIndustryType::CanBuildIndustry |
( |
IndustryType |
industry_type |
) |
[static] |
Can you build this type of industry?
- Parameters:
-
| industry_type | The type of the industry. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- True if you can build this type of industry at locations of your choice.
- Note:
- Returns false if you can only prospect this type of industry, or not build it at all.
static bool AIIndustryType::CanProspectIndustry |
( |
IndustryType |
industry_type |
) |
[static] |
Can you prospect this type of industry?
- Parameters:
-
| industry_type | The type of the industry. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- True if you can prospect this type of industry.
- Note:
- If the setting "Manual primary industry construction method" is set to either "None" or "as other industries" this function always returns false.
Get a list of CargoID accepted by this industry-type.
- Warning:
- This function only returns the default cargos of the industry type. Industries can specify new cargotypes on construction.
- Parameters:
-
| industry_type | The type to get the CargoIDs for. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- The CargoIDs of all cargotypes this industry accepts.
static Money AIIndustryType::GetConstructionCost |
( |
IndustryType |
industry_type |
) |
[static] |
Get the cost for building this industry-type.
- Parameters:
-
| industry_type | The type of the industry. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- The cost for building this industry-type.
static char* AIIndustryType::GetName |
( |
IndustryType |
industry_type |
) |
[static] |
Get the name of an industry-type.
- Parameters:
-
| industry_type | The type to get the name for. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- The name of an industry.
Get a list of CargoID possible produced by this industry-type.
- Warning:
- This function only returns the default cargos of the industry type. Industries can specify new cargotypes on construction.
- Parameters:
-
| industry_type | The type to get the CargoIDs for. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- The CargoIDs of all cargotypes this industry could produce.
static bool AIIndustryType::HasDock |
( |
IndustryType |
industry_type |
) |
[static] |
Does this type of industry have a dock?
- Parameters:
-
| industry_type | The type of the industry. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- True when this type has a dock.
static bool AIIndustryType::HasHeliport |
( |
IndustryType |
industry_type |
) |
[static] |
Does this type of industry have a heliport?
- Parameters:
-
| industry_type | The type of the industry. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- True when this type has a heliport.
static bool AIIndustryType::IsBuiltOnWater |
( |
IndustryType |
industry_type |
) |
[static] |
Is this type of industry built on water.
- Parameters:
-
| industry_type | The type of the industry. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- True when this type is built on water.
static bool AIIndustryType::IsRawIndustry |
( |
IndustryType |
industry_type |
) |
[static] |
Is this industry type a raw industry?
- Parameters:
-
| industry_type | The type of the industry. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- True if it should be handled as a raw industry.
static bool AIIndustryType::IsValidIndustryType |
( |
IndustryType |
industry_type |
) |
[static] |
Checks whether the given industry-type is valid.
- Parameters:
-
| industry_type | The type check. |
- Returns:
- True if and only if the industry-type is valid.
static bool AIIndustryType::ProductionCanIncrease |
( |
IndustryType |
industry_type |
) |
[static] |
Can the production of this industry increase?
- Parameters:
-
| industry_type | The type of the industry. |
- Precondition:
- IsValidIndustryType(industry_type).
- Returns:
- True if the production of this industry can increase.
static bool AIIndustryType::ProspectIndustry |
( |
IndustryType |
industry_type |
) |
[static] |
Prospect an industry of this type.
Prospecting an industries let the game try to create an industry on a random place on the map.
- Parameters:
-
| industry_type | The type of the industry. |
- Precondition:
- CanProspectIndustry(industry_type).
- Returns:
- True if no error occured while trying to prospect.
- Note:
- Even if true is returned there is no guarantee a new industry is build.
-
If true is returned the money is paid, whether a new industry was build or not.