OpenTTD Source: src/industrytype.h Source File

OpenTTD Source 15.0-beta1

industrytype.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
7
10#ifndef INDUSTRYTYPE_H
11#define INDUSTRYTYPE_H
12
13#include "map_type.h"
14#include "slope_type.h"
15#include "industry_type.h"
16#include "landscape_type.h"
17#include "cargo_type.h"
18#include "newgrf_animation_type.h"
19#include "newgrf_commons.h"
20
22 enum IndustryLifeType {
23 INDUSTRYLIFE_BLACK_HOLE = 0,
24 INDUSTRYLIFE_EXTRACTIVE = 1 << 0,
25 INDUSTRYLIFE_ORGANIC = 1 << 1,
26 INDUSTRYLIFE_PROCESSING = 1 << 2,
27};
28
33 enum CheckProc {
34 CHECK_NOTHING,
35 CHECK_FOREST,
36 CHECK_REFINERY,
37 CHECK_FARM,
38 CHECK_PLANTATION,
39 CHECK_WATER,
40 CHECK_LUMBERMILL,
41 CHECK_BUBBLEGEN,
42 CHECK_OIL_RIG,
43 CHECK_END,
44};
45
47 enum IndustryConstructionType {
48 ICT_UNKNOWN,
49 ICT_NORMAL_GAMEPLAY,
50 ICT_MAP_GENERATION,
51 ICT_SCENARIO_EDITOR,
52};
53
55 enum IndustryBehaviour {
56 INDUSTRYBEH_NONE = 0,
57 INDUSTRYBEH_PLANT_FIELDS = 1 << 0,
58 INDUSTRYBEH_CUT_TREES = 1 << 1,
59 INDUSTRYBEH_BUILT_ONWATER = 1 << 2,
60 INDUSTRYBEH_TOWN1200_MORE = 1 << 3,
61 INDUSTRYBEH_ONLY_INTOWN = 1 << 4,
62 INDUSTRYBEH_ONLY_NEARTOWN = 1 << 5,
63 INDUSTRYBEH_PLANT_ON_BUILT = 1 << 6,
64 INDUSTRYBEH_DONT_INCR_PROD = 1 << 7,
65 INDUSTRYBEH_BEFORE_1950 = 1 << 8,
66 INDUSTRYBEH_AFTER_1960 = 1 << 9,
67 INDUSTRYBEH_AI_AIRSHIP_ROUTES = 1 << 10,
68 INDUSTRYBEH_AIRPLANE_ATTACKS = 1 << 11,
69 INDUSTRYBEH_CHOPPER_ATTACKS = 1 << 12,
70 INDUSTRYBEH_CAN_SUBSIDENCE = 1 << 13,
71 /* The following flags are only used for newindustries and do no represent any normal behaviour */
72 INDUSTRYBEH_PROD_MULTI_HNDLING = 1 << 14,
73 INDUSTRYBEH_PRODCALLBACK_RANDOM = 1 << 15,
74 INDUSTRYBEH_NOBUILT_MAPCREATION = 1 << 16,
75 INDUSTRYBEH_CANCLOSE_LASTINSTANCE = 1 << 17,
76 INDUSTRYBEH_CARGOTYPES_UNLIMITED = 1 << 18,
77 INDUSTRYBEH_NO_PAX_PROD_CLAMP = 1 << 19,
78};
79 DECLARE_ENUM_AS_BIT_SET(IndustryBehaviour)
80
81
82enum IndustryTileSpecialFlags {
83 INDTILE_SPECIAL_NONE = 0,
84 INDTILE_SPECIAL_NEXTFRAME_RANDOMBITS = 1 << 0,
85 INDTILE_SPECIAL_ACCEPTS_ALL_CARGO = 1 << 1,
86};
87 DECLARE_ENUM_AS_BIT_SET(IndustryTileSpecialFlags)
88
89
90struct IndustryTileLayoutTile {
91 TileIndexDiffC ti;
92 IndustryGfx gfx;
93};
94
96 using IndustryTileLayout = std::vector<IndustryTileLayoutTile>;
97
101 struct IndustrySpec {
102 std::vector<IndustryTileLayout> layouts;
103 uint8_t cost_multiplier;
104 uint32_t removal_cost_multiplier;
105 uint32_t prospecting_chance;
106 IndustryType conflicting[3];
107 uint8_t check_proc;
108 std::array<CargoID, INDUSTRY_NUM_OUTPUTS> produced_cargo;
109 uint8_t production_rate[INDUSTRY_NUM_OUTPUTS];
114 uint8_t minimal_cargo;
115 std::array<CargoID, INDUSTRY_NUM_INPUTS> accepts_cargo;
116 uint16_t input_cargo_multiplier[INDUSTRY_NUM_INPUTS][INDUSTRY_NUM_OUTPUTS];
117 IndustryLifeType life_type;
118 uint8_t climate_availability;
119 IndustryBehaviour behaviour;
120 uint8_t map_colour;
121 StringID name;
122 StringID new_industry_text;
123 StringID closure_text;
124 StringID production_up_text;
125 StringID production_down_text;
126 StringID station_name;
127 uint8_t appear_ingame[NUM_LANDSCAPE];
128 uint8_t appear_creation[NUM_LANDSCAPE];
129 /* Newgrf data */
130 uint16_t callback_mask;
131 bool enabled;
132 GRFFileProps grf_prop;
133 std::vector<uint8_t> random_sounds;
134
135 std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_ORIGINAL_NUM_OUTPUTS> produced_cargo_label;
136 std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_ORIGINAL_NUM_INPUTS> accepts_cargo_label;
137
138 bool IsRawIndustry() const;
139 bool IsProcessingIndustry() const;
140 Money GetConstructionCost() const;
141 Money GetRemovalCost() const;
142 bool UsesOriginalEconomy() const;
143};
144
149 struct IndustryTileSpec {
150 std::array<CargoID, INDUSTRY_NUM_INPUTS> accepts_cargo;
151 std::array<int8_t, INDUSTRY_NUM_INPUTS> acceptance;
152 Slope slopes_refused;
153 uint8_t anim_production;
154 uint8_t anim_next;
159 bool anim_state;
160 /* Newgrf data */
161 uint8_t callback_mask;
162 AnimationInfo animation;
163 IndustryTileSpecialFlags special_flags;
164 bool enabled;
165 GRFFileProps grf_prop;
166
167 std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_ORIGINAL_NUM_INPUTS> accepts_cargo_label;
168};
169
170/* industry_cmd.cpp*/
171const IndustrySpec *GetIndustrySpec(IndustryType thistype);
172const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx);
173void ResetIndustries();
174
175/* writable arrays of specs */
176extern IndustrySpec _industry_specs[NUM_INDUSTRYTYPES];
177extern IndustryTileSpec _industry_tile_specs[NUM_INDUSTRYTILES];
178
179/* industry_gui.cpp */
180void SortIndustryTypes();
181/* Industry types sorted alphabetically by name. */
182extern std::array<IndustryType, NUM_INDUSTRYTYPES> _sorted_industry_types;
183
189 inline IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
190{
191 /* the 0xFF should be GFX_WATERTILE_SPECIALCHECK but for reasons of include mess,
192 * we'll simplify the writing.
193 * Basically, the first test is required since the GFX_WATERTILE_SPECIALCHECK value
194 * will never be assigned as a tile index and is only required in order to do some
195 * tests while building the industry (as in WATER REQUIRED */
196 if (gfx != 0xFF) {
197 assert(gfx < INVALID_INDUSTRYTILE);
198 const IndustryTileSpec *it = &_industry_tile_specs[gfx];
199 return it->grf_prop.override == INVALID_INDUSTRYTILE ? gfx : it->grf_prop.override;
200 } else {
201 return gfx;
202 }
203}
204
205static const uint8_t IT_INVALID = 255;
206
207#endif /* INDUSTRYTYPE_H */
cargo_type.h
Types related to cargoes...
OverflowSafeInt< int64_t >
DECLARE_ENUM_AS_BIT_SET
#define DECLARE_ENUM_AS_BIT_SET(enum_type)
Operators to allow to work with enum as with type safe bit set in C++.
Definition enum_type.hpp:35
industry_type.h
Types related to the industry.
INDUSTRY_ORIGINAL_NUM_INPUTS
static const int INDUSTRY_ORIGINAL_NUM_INPUTS
Original number of accepted cargo types.
Definition industry_type.h:40
INDUSTRY_NUM_OUTPUTS
static const int INDUSTRY_NUM_OUTPUTS
Number of cargo types an industry can produce.
Definition industry_type.h:39
INDUSTRY_NUM_INPUTS
static const int INDUSTRY_NUM_INPUTS
Number of cargo types an industry can accept.
Definition industry_type.h:38
NUM_INDUSTRYTYPES
static const IndustryType NUM_INDUSTRYTYPES
total number of industry types, new and old; limited to 240 because we need some special ids like INV...
Definition industry_type.h:26
INVALID_INDUSTRYTILE
static const IndustryGfx INVALID_INDUSTRYTILE
one above amount is considered invalid
Definition industry_type.h:34
INDUSTRY_ORIGINAL_NUM_OUTPUTS
static const int INDUSTRY_ORIGINAL_NUM_OUTPUTS
Original number of produced cargo types.
Definition industry_type.h:41
NUM_INDUSTRYTILES
static const IndustryGfx NUM_INDUSTRYTILES
total number of industry tiles, new and old
Definition industry_type.h:33
IndustryLifeType
IndustryLifeType
Available types of industry lifetimes.
Definition industrytype.h:22
INDUSTRYLIFE_EXTRACTIVE
@ INDUSTRYLIFE_EXTRACTIVE
Like mines.
Definition industrytype.h:24
INDUSTRYLIFE_BLACK_HOLE
@ INDUSTRYLIFE_BLACK_HOLE
Like power plants and banks.
Definition industrytype.h:23
INDUSTRYLIFE_PROCESSING
@ INDUSTRYLIFE_PROCESSING
Like factories.
Definition industrytype.h:26
INDUSTRYLIFE_ORGANIC
@ INDUSTRYLIFE_ORGANIC
Like forests.
Definition industrytype.h:25
GetIndustrySpec
const IndustrySpec * GetIndustrySpec(IndustryType thistype)
Array of industries data.
Definition industry_cmd.cpp:123
IndustryConstructionType
IndustryConstructionType
How was the industry created.
Definition industrytype.h:47
ICT_UNKNOWN
@ ICT_UNKNOWN
in previous game version or without newindustries activated
Definition industrytype.h:48
ICT_MAP_GENERATION
@ ICT_MAP_GENERATION
during random map creation
Definition industrytype.h:50
ICT_NORMAL_GAMEPLAY
@ ICT_NORMAL_GAMEPLAY
either by user or random creation process
Definition industrytype.h:49
ICT_SCENARIO_EDITOR
@ ICT_SCENARIO_EDITOR
while editing a scenario
Definition industrytype.h:51
CheckProc
CheckProc
Available procedures to check whether an industry may build at a given location.
Definition industrytype.h:33
CHECK_REFINERY
@ CHECK_REFINERY
Industry should be positioned near edge of the map.
Definition industrytype.h:36
CHECK_END
@ CHECK_END
End marker of the industry check procedures.
Definition industrytype.h:43
CHECK_PLANTATION
@ CHECK_PLANTATION
Industry should NOT be in the desert.
Definition industrytype.h:38
CHECK_OIL_RIG
@ CHECK_OIL_RIG
Industries at sea should be positioned near edge of the map.
Definition industrytype.h:42
CHECK_LUMBERMILL
@ CHECK_LUMBERMILL
Industry should be in the rain forest.
Definition industrytype.h:40
CHECK_WATER
@ CHECK_WATER
Industry should be in the desert.
Definition industrytype.h:39
CHECK_BUBBLEGEN
@ CHECK_BUBBLEGEN
Industry should be in low land.
Definition industrytype.h:41
CHECK_FOREST
@ CHECK_FOREST
Industry should be build above snow-line in arctic climate.
Definition industrytype.h:35
CHECK_FARM
@ CHECK_FARM
Industry should be below snow-line in arctic.
Definition industrytype.h:37
CHECK_NOTHING
@ CHECK_NOTHING
Always succeeds.
Definition industrytype.h:34
GetIndustryTileSpec
const IndustryTileSpec * GetIndustryTileSpec(IndustryGfx gfx)
Array of industry tiles data.
Definition industry_cmd.cpp:137
GetTranslatedIndustryTileID
IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
Do industry gfx ID translation for NewGRFs.
Definition industrytype.h:189
IndustryTileLayout
std::vector< IndustryTileLayoutTile > IndustryTileLayout
A complete tile layout for an industry is a list of tiles.
Definition industrytype.h:96
_sorted_industry_types
std::array< IndustryType, NUM_INDUSTRYTYPES > _sorted_industry_types
Industry types sorted by name.
Definition industry_gui.cpp:224
IndustryBehaviour
IndustryBehaviour
Various industry behaviours mostly to represent original TTD specialities.
Definition industrytype.h:55
INDUSTRYBEH_PROD_MULTI_HNDLING
@ INDUSTRYBEH_PROD_MULTI_HNDLING
Automatic production multiplier handling.
Definition industrytype.h:72
INDUSTRYBEH_CAN_SUBSIDENCE
@ INDUSTRYBEH_CAN_SUBSIDENCE
can cause a subsidence (coal mine, shaft that collapses)
Definition industrytype.h:70
INDUSTRYBEH_AIRPLANE_ATTACKS
@ INDUSTRYBEH_AIRPLANE_ATTACKS
can be exploded by a military airplane (oil refinery)
Definition industrytype.h:68
INDUSTRYBEH_CHOPPER_ATTACKS
@ INDUSTRYBEH_CHOPPER_ATTACKS
can be exploded by a military helicopter (factory)
Definition industrytype.h:69
INDUSTRYBEH_DONT_INCR_PROD
@ INDUSTRYBEH_DONT_INCR_PROD
do not increase production (oil wells) in the temperate climate
Definition industrytype.h:64
INDUSTRYBEH_PLANT_ON_BUILT
@ INDUSTRYBEH_PLANT_ON_BUILT
Fields are planted around when built (all farms)
Definition industrytype.h:63
INDUSTRYBEH_CARGOTYPES_UNLIMITED
@ INDUSTRYBEH_CARGOTYPES_UNLIMITED
Allow produced/accepted cargoes callbacks to supply more than 2 and 3 types.
Definition industrytype.h:76
INDUSTRYBEH_NO_PAX_PROD_CLAMP
@ INDUSTRYBEH_NO_PAX_PROD_CLAMP
Do not clamp production of passengers. (smooth economy only)
Definition industrytype.h:77
INDUSTRYBEH_PRODCALLBACK_RANDOM
@ INDUSTRYBEH_PRODCALLBACK_RANDOM
Production callback needs random bits in var 10.
Definition industrytype.h:73
INDUSTRYBEH_AFTER_1960
@ INDUSTRYBEH_AFTER_1960
can only be built after 1960 (oil rigs)
Definition industrytype.h:66
INDUSTRYBEH_CUT_TREES
@ INDUSTRYBEH_CUT_TREES
cuts trees and produce first output cargo from them (lumber mill)
Definition industrytype.h:58
INDUSTRYBEH_BUILT_ONWATER
@ INDUSTRYBEH_BUILT_ONWATER
is built on water (oil rig)
Definition industrytype.h:59
INDUSTRYBEH_PLANT_FIELDS
@ INDUSTRYBEH_PLANT_FIELDS
periodically plants fields around itself (temp and arctic farms)
Definition industrytype.h:57
INDUSTRYBEH_CANCLOSE_LASTINSTANCE
@ INDUSTRYBEH_CANCLOSE_LASTINSTANCE
Allow closing down the last instance of this type.
Definition industrytype.h:75
INDUSTRYBEH_ONLY_NEARTOWN
@ INDUSTRYBEH_ONLY_NEARTOWN
is always built near towns (toy shop)
Definition industrytype.h:62
INDUSTRYBEH_TOWN1200_MORE
@ INDUSTRYBEH_TOWN1200_MORE
can only be built in towns larger than 1200 inhabitants (temperate bank)
Definition industrytype.h:60
INDUSTRYBEH_ONLY_INTOWN
@ INDUSTRYBEH_ONLY_INTOWN
can only be built in towns (arctic/tropic banks, water tower)
Definition industrytype.h:61
INDUSTRYBEH_BEFORE_1950
@ INDUSTRYBEH_BEFORE_1950
can only be built before 1950 (oil wells)
Definition industrytype.h:65
INDUSTRYBEH_AI_AIRSHIP_ROUTES
@ INDUSTRYBEH_AI_AIRSHIP_ROUTES
ai will attempt to establish air/ship routes to this industry (oil rig)
Definition industrytype.h:67
INDUSTRYBEH_NOBUILT_MAPCREATION
@ INDUSTRYBEH_NOBUILT_MAPCREATION
Do not force one instance of this type to appear on map generation.
Definition industrytype.h:74
ResetIndustries
void ResetIndustries()
This function initialize the spec arrays of both industry and industry tiles.
Definition industry_cmd.cpp:80
IndustryTileSpecialFlags
IndustryTileSpecialFlags
Flags for miscellaneous industry tile specialities.
Definition industrytype.h:82
INDTILE_SPECIAL_ACCEPTS_ALL_CARGO
@ INDTILE_SPECIAL_ACCEPTS_ALL_CARGO
Tile always accepts all cargoes the associated industry accepts.
Definition industrytype.h:85
INDTILE_SPECIAL_NEXTFRAME_RANDOMBITS
@ INDTILE_SPECIAL_NEXTFRAME_RANDOMBITS
Callback 0x26 needs random bits.
Definition industrytype.h:84
SortIndustryTypes
void SortIndustryTypes()
Initialize the list of sorted industry types.
Definition industry_gui.cpp:238
landscape_type.h
Types related to the landscape.
map_type.h
Types related to maps.
newgrf_animation_type.h
Definitions related to NewGRF animation.
newgrf_commons.h
This file simplyfies and embeds a common mechanism of loading/saving and mapping of grf entities.
slope_type.h
Definitions of a slope.
Slope
Slope
Enumeration for the slope-type.
Definition slope_type.h:48
StringID
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Definition strings_type.h:16
AnimationInfo
Information about animation.
Definition newgrf_animation_type.h:18
GRFFileProps
Data related to the handling of grf files.
Definition newgrf_commons.h:324
GRFFileProps::override
uint16_t override
id of the entity been replaced by
Definition newgrf_commons.h:329
IndustrySpec
Defines the data structure for constructing industry.
Definition industrytype.h:101
IndustrySpec::IsProcessingIndustry
bool IsProcessingIndustry() const
Is an industry with the spec a processing industry?
Definition industry_cmd.cpp:3117
IndustrySpec::random_sounds
std::vector< uint8_t > random_sounds
Random sounds;.
Definition industrytype.h:133
IndustrySpec::callback_mask
uint16_t callback_mask
Bitmask of industry callbacks that have to be called.
Definition industrytype.h:130
IndustrySpec::GetRemovalCost
Money GetRemovalCost() const
Get the cost for removing this industry Take note that the cost will always be zero for non-grf indus...
Definition industry_cmd.cpp:3141
IndustrySpec::appear_creation
uint8_t appear_creation[NUM_LANDSCAPE]
Probability of appearance during map creation.
Definition industrytype.h:128
IndustrySpec::accepts_cargo
std::array< CargoID, INDUSTRY_NUM_INPUTS > accepts_cargo
16 accepted cargoes.
Definition industrytype.h:115
IndustrySpec::UsesOriginalEconomy
bool UsesOriginalEconomy() const
Determines whether this industrytype uses standard/newgrf production changes.
Definition industry_cmd.cpp:3150
IndustrySpec::minimal_cargo
uint8_t minimal_cargo
minimum amount of cargo transported to the stations.
Definition industrytype.h:114
IndustrySpec::removal_cost_multiplier
uint32_t removal_cost_multiplier
Base removal cost multiplier.
Definition industrytype.h:104
IndustrySpec::prospecting_chance
uint32_t prospecting_chance
Chance prospecting succeeds.
Definition industrytype.h:105
IndustrySpec::production_up_text
StringID production_up_text
Message appearing when the industry's production is increasing.
Definition industrytype.h:124
IndustrySpec::name
StringID name
Displayed name of the industry.
Definition industrytype.h:121
IndustrySpec::climate_availability
uint8_t climate_availability
Bitmask, giving landscape enums as bit position.
Definition industrytype.h:118
IndustrySpec::accepts_cargo_label
std::array< std::variant< CargoLabel, MixedCargoType >, INDUSTRY_ORIGINAL_NUM_INPUTS > accepts_cargo_label
Cargo labels of accepted cargo for default industries.
Definition industrytype.h:136
IndustrySpec::cost_multiplier
uint8_t cost_multiplier
Base construction cost multiplier.
Definition industrytype.h:103
IndustrySpec::behaviour
IndustryBehaviour behaviour
How this industry will behave, and how others entities can use it.
Definition industrytype.h:119
IndustrySpec::input_cargo_multiplier
uint16_t input_cargo_multiplier[INDUSTRY_NUM_INPUTS][INDUSTRY_NUM_OUTPUTS]
Input cargo multipliers (multiply amount of incoming cargo for the produced cargoes)
Definition industrytype.h:116
IndustrySpec::IsRawIndustry
bool IsRawIndustry() const
Is an industry with the spec a raw industry?
Definition industry_cmd.cpp:3108
IndustrySpec::conflicting
IndustryType conflicting[3]
Industries this industry cannot be close to.
Definition industrytype.h:106
IndustrySpec::appear_ingame
uint8_t appear_ingame[NUM_LANDSCAPE]
Probability of appearance in game.
Definition industrytype.h:127
IndustrySpec::grf_prop
GRFFileProps grf_prop
properties related to the grf file
Definition industrytype.h:132
IndustrySpec::production_down_text
StringID production_down_text
Message appearing when the industry's production is decreasing.
Definition industrytype.h:125
IndustrySpec::station_name
StringID station_name
Default name for nearby station.
Definition industrytype.h:126
IndustrySpec::life_type
IndustryLifeType life_type
This is also known as Industry production flag, in newgrf specs.
Definition industrytype.h:117
IndustrySpec::closure_text
StringID closure_text
Message appearing when the industry closes.
Definition industrytype.h:123
IndustrySpec::new_industry_text
StringID new_industry_text
Message appearing when the industry is built.
Definition industrytype.h:122
IndustrySpec::layouts
std::vector< IndustryTileLayout > layouts
List of possible tile layouts for the industry.
Definition industrytype.h:102
IndustrySpec::enabled
bool enabled
entity still available (by default true).newgrf can disable it, though
Definition industrytype.h:131
IndustrySpec::GetConstructionCost
Money GetConstructionCost() const
Get the cost for constructing this industry.
Definition industry_cmd.cpp:3128
IndustrySpec::map_colour
uint8_t map_colour
colour used for the small map
Definition industrytype.h:120
IndustrySpec::check_proc
uint8_t check_proc
Index to a procedure to check for conflicting circumstances.
Definition industrytype.h:107
IndustrySpec::produced_cargo_label
std::array< std::variant< CargoLabel, MixedCargoType >, INDUSTRY_ORIGINAL_NUM_OUTPUTS > produced_cargo_label
Cargo labels of produced cargo for default industries.
Definition industrytype.h:135
IndustryTileLayoutTile
Definition of one tile in an industry tile layout.
Definition industrytype.h:90
IndustryTileSpec
Defines the data structure of each individual tile of an industry.
Definition industrytype.h:149
IndustryTileSpec::anim_next
uint8_t anim_next
Next frame in an animation.
Definition industrytype.h:154
IndustryTileSpec::special_flags
IndustryTileSpecialFlags special_flags
Bitmask of extra flags used by the tile.
Definition industrytype.h:163
IndustryTileSpec::accepts_cargo
std::array< CargoID, INDUSTRY_NUM_INPUTS > accepts_cargo
Cargo accepted by this tile.
Definition industrytype.h:150
IndustryTileSpec::grf_prop
GRFFileProps grf_prop
properties related to the grf file
Definition industrytype.h:165
IndustryTileSpec::slopes_refused
Slope slopes_refused
slope pattern on which this tile cannot be built
Definition industrytype.h:152
IndustryTileSpec::animation
AnimationInfo animation
Information about the animation (is it looping, how many loops etc)
Definition industrytype.h:162
IndustryTileSpec::accepts_cargo_label
std::array< std::variant< CargoLabel, MixedCargoType >, INDUSTRY_ORIGINAL_NUM_INPUTS > accepts_cargo_label
Cargo labels of accepted cargo for default industry tiles.
Definition industrytype.h:167
IndustryTileSpec::acceptance
std::array< int8_t, INDUSTRY_NUM_INPUTS > acceptance
Level of acceptance per cargo type (signed, may be negative!)
Definition industrytype.h:151
IndustryTileSpec::callback_mask
uint8_t callback_mask
Bitmask of industry tile callbacks that have to be called.
Definition industrytype.h:161
IndustryTileSpec::enabled
bool enabled
entity still available (by default true).newgrf can disable it, though
Definition industrytype.h:164
IndustryTileSpec::anim_state
bool anim_state
When true, the tile has to be drawn using the animation state instead of the construction state.
Definition industrytype.h:159
IndustryTileSpec::anim_production
uint8_t anim_production
Animation frame to start when goods are produced.
Definition industrytype.h:153
TileIndexDiffC
A pair-construct of a TileIndexDiff.
Definition map_type.h:31