OpenTTD Source 20260208-master-g43af8e94d0
IndustryProductionSpriteGroup Struct Reference
Inheritance diagram for IndustryProductionSpriteGroup:
SpecializedSpriteGroup< IndustryProductionSpriteGroup > SpriteGroup

Public Member Functions

 IndustryProductionSpriteGroup (SpriteGroupID index)
Public Member Functions inherited from SpecializedSpriteGroup< IndustryProductionSpriteGroup >
 SpecializedSpriteGroup (SpriteGroupID index)

Data Fields

uint8_t version = 0
 Production callback version used, or 0xFF if marked invalid.
uint8_t num_input = 0
 How many subtract_input values are valid.
std::array< int16_t, INDUSTRY_NUM_INPUTSsubtract_input {}
 Take this much of the input cargo (can be negative, is indirect in cb version 1+).
std::array< CargoType, INDUSTRY_NUM_INPUTScargo_input {}
 Which input cargoes to take from (only cb version 2).
uint8_t num_output = 0
 How many add_output values are valid.
std::array< uint16_t, INDUSTRY_NUM_OUTPUTSadd_output {}
 Add this much output cargo when successful (unsigned, is indirect in cb version 1+).
std::array< CargoType, INDUSTRY_NUM_OUTPUTScargo_output {}
 Which output cargoes to add to (only cb version 2).
uint8_t again = 0
Data Fields inherited from SpriteGroup
uint32_t nfo_line = 0

Protected Member Functions

ResolverResult Resolve (ResolverObject &) const override
 Resolves a callback or rerandomisation callback to a NewGRF.
Protected Member Functions inherited from SpriteGroup
 SpriteGroup (SpriteGroupID index)

Additional Inherited Members

Static Public Member Functions inherited from SpecializedSpriteGroup< IndustryProductionSpriteGroup >
static IndustryProductionSpriteGroupCreate (Targs &&... args)
 Creates a new T-object in the SpriteGroup pool.
Static Public Member Functions inherited from SpriteGroup
static ResolverResult Resolve (const SpriteGroup *group, ResolverObject &object, bool top_level=true)
 ResolverObject (re)entry point.

Detailed Description

Definition at line 273 of file newgrf_spritegroup.h.

Constructor & Destructor Documentation

◆ IndustryProductionSpriteGroup()

IndustryProductionSpriteGroup::IndustryProductionSpriteGroup ( SpriteGroupID index)
inline

Definition at line 274 of file newgrf_spritegroup.h.

Member Function Documentation

◆ Resolve()

ResolverResult IndustryProductionSpriteGroup::Resolve ( ResolverObject & object) const
inlineoverrideprotectedvirtual

Resolves a callback or rerandomisation callback to a NewGRF.

Parameters
objectInformation needed to resolve the group.
Returns
The result of resolving this SpriteGroup.

Implements SpriteGroup.

Definition at line 286 of file newgrf_spritegroup.h.

Field Documentation

◆ add_output

std::array<uint16_t, INDUSTRY_NUM_OUTPUTS> IndustryProductionSpriteGroup::add_output {}

Add this much output cargo when successful (unsigned, is indirect in cb version 1+).

Definition at line 281 of file newgrf_spritegroup.h.

◆ again

uint8_t IndustryProductionSpriteGroup::again = 0

Definition at line 283 of file newgrf_spritegroup.h.

◆ cargo_input

std::array<CargoType, INDUSTRY_NUM_INPUTS> IndustryProductionSpriteGroup::cargo_input {}

Which input cargoes to take from (only cb version 2).

Definition at line 279 of file newgrf_spritegroup.h.

◆ cargo_output

std::array<CargoType, INDUSTRY_NUM_OUTPUTS> IndustryProductionSpriteGroup::cargo_output {}

Which output cargoes to add to (only cb version 2).

Definition at line 282 of file newgrf_spritegroup.h.

◆ num_input

uint8_t IndustryProductionSpriteGroup::num_input = 0

How many subtract_input values are valid.

Definition at line 277 of file newgrf_spritegroup.h.

◆ num_output

uint8_t IndustryProductionSpriteGroup::num_output = 0

How many add_output values are valid.

Definition at line 280 of file newgrf_spritegroup.h.

◆ subtract_input

std::array<int16_t, INDUSTRY_NUM_INPUTS> IndustryProductionSpriteGroup::subtract_input {}

Take this much of the input cargo (can be negative, is indirect in cb version 1+).

Definition at line 278 of file newgrf_spritegroup.h.

◆ version

uint8_t IndustryProductionSpriteGroup::version = 0

Production callback version used, or 0xFF if marked invalid.

Definition at line 276 of file newgrf_spritegroup.h.


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