OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #ifndef INDUSTRYTYPE_H
11 #define INDUSTRYTYPE_H
89 INDTILE_SPECIAL_NONE = 0,
210 static const uint8 IT_INVALID = 255;
@ INDUSTRYBEH_ONLY_INTOWN
can only be built in towns (arctic/tropic banks, water tower)
@ CHECK_WATER
Industry should be in the desert.
uint16 override
id of the entity been replaced by
static const IndustryType NUM_INDUSTRYTYPES
total number of industry types, new and old; limited to 240 because we need some special ids like INV...
byte map_colour
colour used for the small map
static const int INDUSTRY_NUM_OUTPUTS
Number of cargo types an industry can produce.
@ INDUSTRYBEH_CARGOTYPES_UNLIMITED
Allow produced/accepted cargoes callbacks to supply more than 2 and 3 types.
bool UsesOriginalEconomy() const
Determines whether this industrytype uses standard/newgrf production changes.
@ INDUSTRYBEH_AFTER_1960
can only be built after 1960 (oil rigs)
@ INDUSTRYBEH_NO_PAX_PROD_CLAMP
Do not clamp production of passengers. (smooth economy only)
IndustryConstructionType
How was the industry created.
@ CHECK_FOREST
Industry should be build above snow-line in arctic climate.
Money GetRemovalCost() const
Get the cost for removing this industry Take note that the cost will always be zero for non-grf indus...
static const int INDUSTRY_NUM_INPUTS
Number of cargo types an industry can accept.
Money GetConstructionCost() const
Get the cost for constructing this industry.
bool anim_state
When true, the tile has to be drawn using the animation state instead of the construction state.
@ INDUSTRYBEH_CAN_SUBSIDENCE
can cause a subsidence (coal mine, shaft that collapses)
uint32 removal_cost_multiplier
Base removal cost multiplier.
Information about animation.
@ INDUSTRYBEH_DONT_INCR_PROD
do not increase production (oil wells) in the temperate climate
@ CHECK_BUBBLEGEN
Industry should be in low land.
@ INDTILE_SPECIAL_NEXTFRAME_RANDOMBITS
Callback 0x26 needs random bits.
byte climate_availability
Bitmask, giving landscape enums as bit position.
StringID station_name
Default name for nearby station.
@ INDUSTRYBEH_NOBUILT_MAPCREATION
Do not force one instance of this type to appear on map generation.
std::vector< IndustryTileLayoutTile > IndustryTileLayout
A complete tile layout for an industry is a list of tiles.
@ INDUSTRYBEH_PLANT_ON_BUILT
Fields are planted around when built (all farms)
StringID closure_text
Message appearing when the industry closes.
@ INDUSTRYBEH_AIRPLANE_ATTACKS
can be exploded by a military airplane (oil refinery)
IndustryTileSpecialFlags special_flags
Bitmask of extra flags used by the tile.
@ INDUSTRYBEH_AI_AIRSHIP_ROUTES
ai will attempt to establish air/ship routes to this industry (oil rig)
@ CHECK_END
End marker of the industry check procedures.
int8 acceptance[INDUSTRY_NUM_INPUTS]
Level of acceptance per cargo type (signed, may be negative!)
bool IsRawIndustry() const
Is an industry with the spec a raw industry?
IndustryType conflicting[3]
Industries this industry cannot be close to.
@ INDUSTRYBEH_PLANT_FIELDS
periodically plants fields around itself (temp and arctic farms)
std::vector< IndustryTileLayout > layouts
List of possible tile layouts for the industry.
CargoID accepts_cargo[INDUSTRY_NUM_INPUTS]
16 accepted cargoes.
static const IndustryGfx INVALID_INDUSTRYTILE
one above amount is considered invalid
uint8 number_of_sounds
Number of sounds available in the sounds array.
Data related to the handling of grf files.
@ INDUSTRYBEH_BUILT_ONWATER
is built on water (oil rig)
StringID production_up_text
Message appearing when the industry's production is increasing.
uint16 input_cargo_multiplier[INDUSTRY_NUM_INPUTS][INDUSTRY_NUM_OUTPUTS]
Input cargo multipliers (multiply amount of incoming cargo for the produced cargoes)
byte minimal_cargo
minimum amount of cargo transported to the stations.
Slope slopes_refused
slope pattern on which this tile cannot be built
@ ICT_UNKNOWN
in previous game version or without newindustries activated
@ INDUSTRYBEH_PRODCALLBACK_RANDOM
Production callback needs random bits in var 10.
bool enabled
entity still available (by default true).newgrf can disable it, though
@ INDUSTRYBEH_BEFORE_1950
can only be built before 1950 (oil wells)
static const IndustryGfx NUM_INDUSTRYTILES
total number of industry tiles, new and old
Slope
Enumeration for the slope-type.
@ INDUSTRYLIFE_BLACK_HOLE
Like power plants and banks.
byte appear_creation[NUM_LANDSCAPE]
Probability of appearance during map creation.
byte anim_production
Animation frame to start when goods are produced.
@ CHECK_FARM
Industry should be below snow-line in arctic.
Defines the data structure for constructing industry.
GRFFileProps grf_prop
properties related to the grf file
@ ICT_MAP_GENERATION
during random map creation
A pair-construct of a TileIndexDiff.
@ INDUSTRYLIFE_PROCESSING
Like factories.
CargoID accepts_cargo[INDUSTRY_NUM_INPUTS]
Cargo accepted by this tile.
bool enabled
entity still available (by default true).newgrf can disable it, though
uint32 StringID
Numeric value that represents a string, independent of the selected language.
bool IsProcessingIndustry() const
Is an industry with the spec a processing industry?
@ CHECK_OIL_RIG
Industries at sea should be positioned near edge of the map.
@ CLEAN_RANDOMSOUNDS
Free the dynamically allocated sounds table.
@ CHECK_LUMBERMILL
Industry should be in the rain forest.
uint8 cost_multiplier
Base construction cost multiplier.
@ INDUSTRYBEH_ONLY_NEARTOWN
is always built near towns (toy shop)
AnimationInfo animation
Information about the animation (is it looping, how many loops etc)
@ INDUSTRYBEH_PROD_MULTI_HNDLING
Automatic production multiplier handling.
@ ICT_SCENARIO_EDITOR
while editing a scenario
void ResetIndustries()
This function initialize the spec arrays of both industry and industry tiles.
@ INDUSTRYLIFE_ORGANIC
Like forests.
StringID production_down_text
Message appearing when the industry's production is decreasing.
uint8 cleanup_flag
flags indicating which data should be freed upon cleaning up
GRFFileProps grf_prop
properties related to the grf file
byte appear_ingame[NUM_LANDSCAPE]
Probability of appearance in game.
uint32 prospecting_chance
Chance prospecting succeeds.
Definition of one tile in an industry tile layout.
uint16 callback_mask
Bitmask of industry callbacks that have to be called.
@ CHECK_NOTHING
Always succeeds.
const uint8 * random_sounds
array of random sounds.
IndustryLifeType life_type
This is also known as Industry production flag, in newgrf specs.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
uint8 callback_mask
Bitmask of industry tile callbacks that have to be called.
const IndustrySpec * GetIndustrySpec(IndustryType thistype)
Array of industries data.
IndustryBehaviour behaviour
How this industry will behave, and how others entities can use it.
@ INDUSTRYBEH_CANCLOSE_LASTINSTANCE
Allow closing down the last instance of this type.
byte CargoID
Cargo slots to indicate a cargo type within a game.
@ INDUSTRYBEH_CHOPPER_ATTACKS
can be exploded by a military helicopter (factory)
@ INDUSTRYBEH_TOWN1200_MORE
can only be built in towns larger than 1200 inhabitants (temperate bank)
IndustryTileSpecialFlags
Flags for miscellaneous industry tile specialities.
byte check_proc
Index to a procedure to check for conflicting circumstances.
void SortIndustryTypes()
Initialize the list of sorted industry types.
StringID name
Displayed name of the industry.
IndustryBehaviour
Various industry behaviours mostly to represent original TTD specialities.
StringID new_industry_text
Message appearing when the industry is built.
const IndustryTileSpec * GetIndustryTileSpec(IndustryGfx gfx)
Array of industry tiles data.
std::array< IndustryType, NUM_INDUSTRYTYPES > _sorted_industry_types
Industry types sorted by name.
@ INDUSTRYBEH_CUT_TREES
cuts trees and produce first output cargo from them (lumber mill)
byte anim_next
Next frame in an animation.
Defines the data structure of each individual tile of an industry.
@ CHECK_PLANTATION
Industry should NOT be in the desert.
CheckProc
Available procedures to check whether an industry may build at a given location.
@ CHECK_REFINERY
Industry should be positioned near edge of the map.
IndustryLifeType
Available types of industry lifetimes.
@ INDTILE_SPECIAL_ACCEPTS_ALL_CARGO
Tile always accepts all cargoes the associated industry accepts.
static IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
Do industry gfx ID translation for NewGRFs.
@ ICT_NORMAL_GAMEPLAY
either by user or random creation process
@ INDUSTRYLIFE_EXTRACTIVE
Like mines.