OpenTTD Source 20241224-master-gee860a5c8e
IndustryTileSpec Struct Reference

Defines the data structure of each individual tile of an industry. More...

#include <industrytype.h>

Data Fields

std::array< CargoID, INDUSTRY_NUM_INPUTSaccepts_cargo
 Cargo accepted by this tile.
 
std::array< int8_t, INDUSTRY_NUM_INPUTSacceptance
 Level of acceptance per cargo type (signed, may be negative!)
 
Slope slopes_refused
 slope pattern on which this tile cannot be built
 
uint8_t anim_production
 Animation frame to start when goods are produced.
 
uint8_t 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 state.
 
uint8_t callback_mask
 Bitmask of industry tile callbacks that have to be called.
 
AnimationInfo animation
 Information about the animation (is it looping, how many loops etc)
 
IndustryTileSpecialFlags special_flags
 Bitmask of extra flags used by the tile.
 
bool enabled
 entity still available (by default true).newgrf can disable it, though
 
GRFFileProps grf_prop
 properties related to the grf file
 
std::array< std::variant< CargoLabel, MixedCargoType >, INDUSTRY_ORIGINAL_NUM_INPUTSaccepts_cargo_label
 Cargo labels of accepted cargo for default industry tiles.
 

Detailed Description

Defines the data structure of each individual tile of an industry.

Note
A tile can at most accept 3 types of cargo, even if an industry as a whole can accept more types.

Definition at line 149 of file industrytype.h.

Field Documentation

◆ acceptance

std::array<int8_t, INDUSTRY_NUM_INPUTS> IndustryTileSpec::acceptance

Level of acceptance per cargo type (signed, may be negative!)

Definition at line 151 of file industrytype.h.

◆ accepts_cargo

std::array<CargoID, INDUSTRY_NUM_INPUTS> IndustryTileSpec::accepts_cargo

Cargo accepted by this tile.

Definition at line 150 of file industrytype.h.

Referenced by FinaliseIndustriesArray().

◆ accepts_cargo_label

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 167 of file industrytype.h.

Referenced by FinaliseIndustriesArray().

◆ anim_next

uint8_t IndustryTileSpec::anim_next

Next frame in an animation.

Definition at line 154 of file industrytype.h.

◆ anim_production

uint8_t IndustryTileSpec::anim_production

Animation frame to start when goods are produced.

Definition at line 153 of file industrytype.h.

◆ anim_state

bool IndustryTileSpec::anim_state

When true, the tile has to be drawn using the animation state instead of the construction state.

Definition at line 159 of file industrytype.h.

◆ animation

AnimationInfo IndustryTileSpec::animation

Information about the animation (is it looping, how many loops etc)

Definition at line 162 of file industrytype.h.

Referenced by DoCreateNewIndustry().

◆ callback_mask

uint8_t IndustryTileSpec::callback_mask

Bitmask of industry tile callbacks that have to be called.

Definition at line 161 of file industrytype.h.

Referenced by CheckIfIndustryTileSlopes().

◆ enabled

bool IndustryTileSpec::enabled

entity still available (by default true).newgrf can disable it, though

Definition at line 164 of file industrytype.h.

◆ grf_prop

◆ slopes_refused

Slope IndustryTileSpec::slopes_refused

slope pattern on which this tile cannot be built

Definition at line 152 of file industrytype.h.

Referenced by CheckIfIndustryTilesAreFree(), CheckIfIndustryTileSlopes(), and PerformIndustryTileSlopeCheck().

◆ special_flags

IndustryTileSpecialFlags IndustryTileSpec::special_flags

Bitmask of extra flags used by the tile.

Definition at line 163 of file industrytype.h.


The documentation for this struct was generated from the following file: