Defines the data structure for constructing industry. More...
#include <industrytype.h>
Public Member Functions | |
bool | IsRawIndustry () const |
Is an industry with the spec a raw industry? | |
Money | GetConstructionCost () const |
Get the cost for constructing this industry. | |
Money | GetRemovalCost () const |
Get the cost for removing this industry Take note that the cost will always be zero for non-grf industries. | |
bool | UsesSmoothEconomy () const |
Determines whether this industrytype uses smooth economy or whether it uses standard/newgrf production changes. | |
Data Fields | |
const IndustryTileTable *const * | table |
List of the tiles composing the industry. | |
byte | num_table |
Number of elements in the table. | |
uint8 | cost_multiplier |
Base construction cost multiplier. | |
uint32 | removal_cost_multiplier |
Base removal cost multiplier. | |
uint32 | prospecting_chance |
Chance prospecting succeeds. | |
IndustryType | conflicting [3] |
Industries this industry cannot be close to. | |
byte | check_proc |
Index to a procedure to check for conflicting circumstances. | |
CargoID | produced_cargo [2] |
byte | production_rate [2] |
byte | minimal_cargo |
minimum amount of cargo transported to the stations If the waiting cargo is less than this number, no cargo is moved to it | |
CargoID | accepts_cargo [3] |
3 accepted cargos | |
uint16 | input_cargo_multiplier [3][2] |
Input cargo multipliers (multiply amount of incoming cargo for the produced cargos). | |
IndustryLifeType | life_type |
This is also known as Industry production flag, in newgrf specs. | |
byte | climate_availability |
Bitmask, giving landscape enums as bit position. | |
IndustryBehaviour | behaviour |
How this industry will behave, and how others entities can use it. | |
byte | map_colour |
colour used for the small map | |
StringID | name |
Displayed name of the industry. | |
StringID | new_industry_text |
Message appearing when the industry is built. | |
StringID | closure_text |
Message appearing when the industry closes. | |
StringID | production_up_text |
Message appearing when the industry's production is increasing. | |
StringID | production_down_text |
Message appearing when the industry's production is decreasing. | |
StringID | station_name |
Default name for nearby station. | |
byte | appear_ingame [NUM_LANDSCAPE] |
Probability of appearance in game. | |
byte | appear_creation [NUM_LANDSCAPE] |
Probability of appearance during map creation. | |
uint8 | number_of_sounds |
Number of sounds available in the sounds array. | |
const uint8 * | random_sounds |
array of random sounds. | |
uint16 | callback_mask |
Bitmask of industry callbacks that have to be called. | |
uint8 | cleanup_flag |
flags indicating which data should be freed upon cleaning up | |
bool | enabled |
entity still available (by default true).newgrf can disable it, though | |
GRFFileProps | grf_prop |
properties related to the grf file |
Defines the data structure for constructing industry.
Definition at line 103 of file industrytype.h.
Money IndustrySpec::GetConstructionCost | ( | ) | const |
Get the cost for constructing this industry.
Definition at line 2683 of file industry_cmd.cpp.
References _settings_game, GameSettings::construction, cost_multiplier, and ConstructionSettings::raw_industry_construction.
Referenced by CmdBuildIndustry(), BuildIndustryWindow::DrawWidget(), and AIIndustryType::GetConstructionCost().
Money IndustrySpec::GetRemovalCost | ( | ) | const |
Get the cost for removing this industry Take note that the cost will always be zero for non-grf industries.
Only if the grf author did specified a cost will it be applicable.
Definition at line 2696 of file industry_cmd.cpp.
References removal_cost_multiplier.
bool IndustrySpec::IsRawIndustry | ( | ) | const |
Is an industry with the spec a raw industry?
Definition at line 2672 of file industry_cmd.cpp.
References behaviour, INDUSTRYLIFE_EXTRACTIVE, INDUSTRYLIFE_ORGANIC, and life_type.
Referenced by CmdBuildIndustry(), AIIndustryType::IsRawIndustry(), BuildIndustryWindow::OnClick(), and BuildIndustryWindow::SetStringParameters().
bool IndustrySpec::UsesSmoothEconomy | ( | ) | const |
Determines whether this industrytype uses smooth economy or whether it uses standard/newgrf production changes.
Definition at line 2705 of file industry_cmd.cpp.
References _settings_game, callback_mask, CBM_IND_MONTHLYPROD_CHANGE, CBM_IND_PRODUCTION_256_TICKS, CBM_IND_PRODUCTION_CARGO_ARRIVAL, CBM_IND_PRODUCTION_CHANGE, GameSettings::economy, HasBit(), and EconomySettings::smooth_economy.
Referenced by ChangeIndustryProduction(), DoCreateNewIndustry(), IndustryViewWindow::OnInvalidateData(), and Industry::RecomputeProductionMultipliers().