OpenTTD Source: IndustryTileSpec Struct Reference

OpenTTD Source 15.0-RC2

Data Fields
IndustryTileSpec Struct Reference

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

`#include <industrytype.h>`

## 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
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 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.
bool | enabled
| entity still available (by default true).newgrf can disable it, though
SubstituteGRFFileProps | grf_prop
| properties related to the grf file
std::vector< BadgeID > | badges
std::array< std::variant< CargoLabel, MixedCargoType >, INDUSTRY_ORIGINAL_NUM_INPUTS > | accepts_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 152 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 154 of file industrytype.h.

## ◆ accepts_cargo

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

Cargo accepted by this tile.

Definition at line 153 of file industrytype.h.

## ◆ 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 171 of file industrytype.h.

## ◆ anim_next

uint8_t IndustryTileSpec::anim_next

Next frame in an animation.

Definition at line 157 of file industrytype.h.

## ◆ anim_production

uint8_t IndustryTileSpec::anim_production

Animation frame to start when goods are produced.

Definition at line 156 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 stage.

Definition at line 162 of file industrytype.h.

## ◆ animation

AnimationInfo<IndustryAnimationTriggers> IndustryTileSpec::animation

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

Definition at line 165 of file industrytype.h.

Referenced by DoCreateNewIndustry().

## ◆ badges

std::vector<BadgeID> IndustryTileSpec::badges

Definition at line 169 of file industrytype.h.

## ◆ callback_mask

IndustryTileCallbackMasks IndustryTileSpec::callback_mask

Bitmask of industry tile callbacks that have to be called.

Definition at line 164 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 167 of file industrytype.h.

## ◆ grf_prop

SubstituteGRFFileProps IndustryTileSpec::grf_prop

properties related to the grf file

Definition at line 168 of file industrytype.h.

Referenced by DoTriggerIndustryTileRandomisation(), IndustryTileResolverObject::GetDebugID(), NIHIndustryTile::GetGRFID(), GetIndTileGrffile(), GetIndustryIDAtOffset(), GetTranslatedIndustryTileID(), IndustryTileResolverObject::IndustryTileResolverObject(), NIHIndustryTile::IsInspectable(), and PerformIndustryTileSlopeCheck().

## ◆ slopes_refused

Slope IndustryTileSpec::slopes_refused

slope pattern on which this tile cannot be built

Definition at line 155 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 166 of file industrytype.h.

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

- src/industrytype.h