#include <ai_industrytype.hpp>
Static Public Member Functions | |
static const char * | GetClassName () |
static bool | IsValidIndustryType (IndustryType industry_type) |
Checks whether the given industry-type is valid. | |
static char * | GetName (IndustryType industry_type) |
Get the name of an industry-type. | |
static AIList * | GetProducedCargo (IndustryType industry_type) |
Get a list of CargoID possible produced by this industry-type. | |
static AIList * | GetAcceptedCargo (IndustryType industry_type) |
Get a list of CargoID accepted by this industry-type. | |
static bool | IsRawIndustry (IndustryType industry_type) |
Is this industry type a raw industry? | |
static bool | ProductionCanIncrease (IndustryType industry_type) |
Can the production of this industry increase? | |
static Money | GetConstructionCost (IndustryType industry_type) |
Get the cost for building this industry-type. | |
static bool | CanBuildIndustry (IndustryType industry_type) |
Can you build this type of industry? | |
static bool | CanProspectIndustry (IndustryType industry_type) |
Can you prospect this type of industry? | |
static bool | BuildIndustry (IndustryType industry_type, TileIndex tile) |
Build an industry of the specified type. | |
static bool | ProspectIndustry (IndustryType industry_type) |
Prospect an industry of this type. |
Definition at line 15 of file ai_industrytype.hpp.
bool AIIndustryType::IsValidIndustryType | ( | IndustryType | industry_type | ) | [static] |
Checks whether the given industry-type is valid.
industry_type | The type check. |
Definition at line 12 of file ai_industrytype.cpp.
References IndustrySpec::enabled, GetIndustrySpec(), and NUM_INDUSTRYTYPES.
Referenced by CanBuildIndustry(), CanProspectIndustry(), GetAcceptedCargo(), GetConstructionCost(), GetName(), GetProducedCargo(), IsRawIndustry(), and ProductionCanIncrease().
char * AIIndustryType::GetName | ( | IndustryType | industry_type | ) | [static] |
Get the name of an industry-type.
industry_type | The type to get the name for. |
Definition at line 41 of file ai_industrytype.cpp.
References GetIndustrySpec(), and IsValidIndustryType().
AIList * AIIndustryType::GetProducedCargo | ( | IndustryType | industry_type | ) | [static] |
Get a list of CargoID possible produced by this industry-type.
industry_type | The type to get the CargoIDs for. |
Definition at line 52 of file ai_industrytype.cpp.
References GetIndustrySpec(), IsValidIndustryType(), lengthof, and IndustrySpec::produced_cargo.
AIList * AIIndustryType::GetAcceptedCargo | ( | IndustryType | industry_type | ) | [static] |
Get a list of CargoID accepted by this industry-type.
industry_type | The type to get the CargoIDs for. |
Definition at line 66 of file ai_industrytype.cpp.
References IndustrySpec::accepts_cargo, GetIndustrySpec(), IsValidIndustryType(), and lengthof.
bool AIIndustryType::IsRawIndustry | ( | IndustryType | industry_type | ) | [static] |
Is this industry type a raw industry?
industry_type | The type of the industry. |
Definition at line 19 of file ai_industrytype.cpp.
References GetIndustrySpec(), IndustrySpec::IsRawIndustry(), and IsValidIndustryType().
Referenced by CanBuildIndustry(), and CanProspectIndustry().
bool AIIndustryType::ProductionCanIncrease | ( | IndustryType | industry_type | ) | [static] |
Can the production of this industry increase?
industry_type | The type of the industry. |
Definition at line 26 of file ai_industrytype.cpp.
References _settings_game, GameSettings::game_creation, GetIndustrySpec(), INDUSTRYBEH_DONT_INCR_PROD, IsValidIndustryType(), and GameCreationSettings::landscape.
Money AIIndustryType::GetConstructionCost | ( | IndustryType | industry_type | ) | [static] |
Get the cost for building this industry-type.
industry_type | The type of the industry. |
Definition at line 34 of file ai_industrytype.cpp.
References IndustrySpec::GetConstructionCost(), GetIndustrySpec(), and IsValidIndustryType().
bool AIIndustryType::CanBuildIndustry | ( | IndustryType | industry_type | ) | [static] |
Can you build this type of industry?
industry_type | The type of the industry. |
Definition at line 80 of file ai_industrytype.cpp.
References _settings_game, GameSettings::construction, GetIndustrySpec(), IsRawIndustry(), IsValidIndustryType(), and ConstructionSettings::raw_industry_construction.
Referenced by BuildIndustry().
bool AIIndustryType::CanProspectIndustry | ( | IndustryType | industry_type | ) | [static] |
Can you prospect this type of industry?
industry_type | The type of the industry. |
Definition at line 89 of file ai_industrytype.cpp.
References _settings_game, GameSettings::construction, GetIndustrySpec(), IsRawIndustry(), IsValidIndustryType(), and ConstructionSettings::raw_industry_construction.
Referenced by ProspectIndustry().
bool AIIndustryType::BuildIndustry | ( | IndustryType | industry_type, | |
TileIndex | tile | |||
) | [static] |
Build an industry of the specified type.
industry_type | The type of the industry to build. | |
tile | The tile to build the industry on. |
Definition at line 98 of file ai_industrytype.cpp.
References CanBuildIndustry(), CMD_BUILD_INDUSTRY, AIObject::DoCommand(), EnforcePrecondition, GetIndustrySpec(), and AIMap::IsValidTile().
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.
industry_type | The type of the industry. |
If true is returned the money is paid, whether a new industry was build or not.
Definition at line 107 of file ai_industrytype.cpp.
References CanProspectIndustry(), CMD_BUILD_INDUSTRY, AIObject::DoCommand(), and EnforcePrecondition.