|
OpenTTD Source 20261112-master-gbcbec5e63f
|
Defines the data structure of each individual tile of an industry. More...
#include <industrytype.h>
Public Member Functions | |
| constexpr | IndustryTileSpec (int8_t ca1, std::variant< CargoLabel, MixedCargoType > c1, int8_t ca2, std::variant< CargoLabel, MixedCargoType > c2, int8_t ca3, std::variant< CargoLabel, MixedCargoType > c3, Slope sl, IndustryGfx a1, IndustryGfx a2, bool a3) |
| Creates IndustryTileSpec from the properties of an industry tile. | |
| constexpr | IndustryTileSpec (int8_t cargo_acceptance1, std::variant< CargoLabel, MixedCargoType > cargo1, int8_t cargo_acceptance2, std::variant< CargoLabel, MixedCargoType > cargo2, bool is_construction) |
| Creates IndustryTileSpec with some default values. | |
Data Fields | |
| std::array< CargoType, INDUSTRY_NUM_INPUTS > | accepts_cargo |
| Cargo accepted by this tile. | |
| std::array< int8_t, INDUSTRY_NUM_INPUTS > | acceptance |
| Level of acceptance per cargo type (signed, may be negative!). | |
| Slope | slopes_refused |
| slope pattern on which this tile cannot be built | |
| IndustryGfx | anim_production |
| Animation frame to start when goods are produced. | |
| IndustryGfx | anim_next |
| Next frame in an animation. | |
| bool | anim_state |
| When true, the tile has to be drawn using the animation state instead of the construction stage. | |
| IndustryTileCallbackMasks | callback_mask {} |
| Bitmask of industry tile callbacks that have to be called. | |
| AnimationInfo< IndustryAnimationTriggers > | animation {} |
| Information about the animation (is it looping, how many loops etc). | |
| IndustryTileSpecialFlags | special_flags {} |
| Bitmask of extra flags used by the tile. | |
| SubstituteGRFFileProps | grf_prop {INVALID_INDUSTRYTILE} |
| properties related to the grf file | |
| std::vector< BadgeID > | badges {} |
| Badge list. | |
| std::array< std::variant< CargoLabel, MixedCargoType >, INDUSTRY_ORIGINAL_NUM_INPUTS > | accepts_cargo_label |
| Cargo labels of accepted cargo for default industry tiles. | |
Defines the data structure of each individual tile of an industry.
Definition at line 158 of file industrytype.h.
|
inlineconstexpr |
Creates IndustryTileSpec from the properties of an industry tile.
| ca1 | Acceptance of first cargo. |
| c1 | First type of cargo accepted for this tile. |
| ca2 | Acceptance of second cargo. |
| c2 | Second cargo. |
| ca3 | Acceptance of third cargo. |
| c3 | Third cargo. Those three are in an array. |
| sl | Slope refused upon choosing a place to build. |
| a1 | Animation frame on production. |
| a2 | Next frame of animation. |
| a3 | Chooses between animation or construction stage. |
Definition at line 193 of file industrytype.h.
References acceptance, accepts_cargo, accepts_cargo_label, anim_next, anim_production, anim_state, INVALID_CARGO, and slopes_refused.
|
inlineconstexpr |
Creates IndustryTileSpec with some default values.
| cargo_acceptance1 | Acceptance of first cargo. |
| cargo1 | First type of cargo accepted for this tile. |
| cargo_acceptance2 | Acceptance of second cargo. |
| cargo2 | Second cargo. |
| is_construction | Chooses between animation or construction stage. |
Definition at line 206 of file industrytype.h.
References CT_INVALID, INDUSTRYTILE_NOANIM, and SLOPE_STEEP.
| std::array<int8_t, INDUSTRY_NUM_INPUTS> IndustryTileSpec::acceptance |
Level of acceptance per cargo type (signed, may be negative!).
Definition at line 160 of file industrytype.h.
Referenced by AddAcceptedCargo_Industry(), and IndustryTileSpec().
| std::array<CargoType, INDUSTRY_NUM_INPUTS> IndustryTileSpec::accepts_cargo |
Cargo accepted by this tile.
Definition at line 159 of file industrytype.h.
Referenced by AddAcceptedCargo_Industry(), and IndustryTileSpec().
| std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_ORIGINAL_NUM_INPUTS> IndustryTileSpec::accepts_cargo_label |
Cargo labels of accepted cargo for default industry tiles.
Definition at line 176 of file industrytype.h.
Referenced by IndustryTileSpec().
| IndustryGfx IndustryTileSpec::anim_next |
Next frame in an animation.
Definition at line 163 of file industrytype.h.
Referenced by IndustryTileSpec(), and TileLoop_Industry().
| IndustryGfx IndustryTileSpec::anim_production |
Animation frame to start when goods are produced.
Definition at line 162 of file industrytype.h.
Referenced by IndustryTileSpec(), and TileLoop_Industry().
| bool IndustryTileSpec::anim_state |
When true, the tile has to be drawn using the animation state instead of the construction stage.
Definition at line 168 of file industrytype.h.
Referenced by DrawTile_Industry(), and IndustryTileSpec().
| AnimationInfo<IndustryAnimationTriggers> IndustryTileSpec::animation {} |
Information about the animation (is it looping, how many loops etc).
Definition at line 171 of file industrytype.h.
Referenced by DoCreateNewIndustry().
| std::vector<BadgeID> IndustryTileSpec::badges {} |
Badge list.
Definition at line 174 of file industrytype.h.
Referenced by NIHIndustryTile::GetBadges().
| IndustryTileCallbackMasks IndustryTileSpec::callback_mask {} |
Bitmask of industry tile callbacks that have to be called.
Definition at line 170 of file industrytype.h.
Referenced by AddAcceptedCargo_Industry(), CheckIfIndustryTileSlopes(), GetFoundation_Industry(), and TerraformTile_Industry().
| SubstituteGRFFileProps IndustryTileSpec::grf_prop {INVALID_INDUSTRYTILE} |
properties related to the grf file
Definition at line 173 of file industrytype.h.
Referenced by AddAcceptedCargo_Industry(), DoTriggerIndustryTileRandomisation(), DrawTile_Industry(), IndustryTileResolverObject::GetDebugID(), GetFoundation_Industry(), NIHIndustryTile::GetGRFID(), GetIndTileGrffile(), GetIndustryIDAtOffset(), GetTranslatedIndustryTileID(), IndustryTileResolverObject::IndustryTileResolverObject(), NIHIndustryTile::IsInspectable(), PerformIndustryTileSlopeCheck(), and TerraformTile_Industry().
| Slope IndustryTileSpec::slopes_refused |
slope pattern on which this tile cannot be built
Definition at line 161 of file industrytype.h.
Referenced by CheckIfIndustryTilesAreFree(), CheckIfIndustryTileSlopes(), IndustryTileSpec(), and PerformIndustryTileSlopeCheck().
| IndustryTileSpecialFlags IndustryTileSpec::special_flags {} |
Bitmask of extra flags used by the tile.
Definition at line 172 of file industrytype.h.
Referenced by AddAcceptedCargo_Industry().