OpenTTD Source: SubstituteGRFFileProps Struct Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Data Fields
SubstituteGRFFileProps Struct Reference

NewGRF entities which can replace default entities. More...

`#include <newgrf_commons.h>`

Inheritance diagram for SubstituteGRFFileProps:

## Public Member Functions
constexpr | SubstituteGRFFileProps (uint16_t subst_id=0)
| Set all default data constructor for the props.
Public Member Functions inherited from StandardGRFFileProps
bool | HasSpriteGroups () const
| Check whether the entity has sprite groups.
const struct SpriteGroup * | GetSpriteGroup (bool entity_exists) const
| Get the standard sprite group.
Public Member Functions inherited from FixedGRFFileProps< StandardSpriteGroup, static_cast< size_t >(StandardSpriteGroup::End)>
const struct SpriteGroup * | GetSpriteGroup (StandardSpriteGroup index) const
| Get the SpriteGroup at the specified index.
const struct SpriteGroup * | GetFirstSpriteGroupOf (std::initializer_list< StandardSpriteGroup > indices) const
| Get the first existing SpriteGroup from a list of options.
void | SetSpriteGroup (StandardSpriteGroup index, const struct SpriteGroup *spritegroup)
| Set the SpriteGroup at the specified index.
Public Member Functions inherited from GRFFilePropsBase
void | SetGRFFile (const struct GRFFile *grffile)
| Set the NewGRF file, and its grfid, associated with grf props.
bool | HasGrfFile () const
| Test if this entity was introduced by NewGRF.

## Data Fields
uint16_t | subst_id
uint16_t | override_id
| id of the entity been replaced by
Data Fields inherited from FixedGRFFileProps< StandardSpriteGroup, static_cast< size_t >(StandardSpriteGroup::End)>
std::array< const struct SpriteGroup *, Tcount > | spritegroups
| pointers to the different sprite groups of the entity
Data Fields inherited from GRFFilePropsBase
uint16_t | local_id = 0
| id defined by the grf file for this entity
uint32_t | grfid = 0
| grfid that introduced this entity.
const struct GRFFile * | grffile = nullptr
| grf file that introduced this entity

## Detailed Description

NewGRF entities which can replace default entities.

Definition at line 464 of file newgrf_commons.h.

## Constructor & Destructor Documentation

## ◆ SubstituteGRFFileProps()

constexpr SubstituteGRFFileProps::SubstituteGRFFileProps | ( | uint16_t | subst_id = `0` | ) |
| inlineconstexpr

Set all default data constructor for the props.

Definition at line 466 of file newgrf_commons.h.

## Field Documentation

## ◆ override_id

uint16_t SubstituteGRFFileProps::override_id

id of the entity been replaced by

Definition at line 469 of file newgrf_commons.h.

Referenced by AirportSpec::Get(), GetAirportTileIDAtOffset(), GetIndustryIDAtOffset(), GetTranslatedAirportTileID(), GetTranslatedHouseID(), GetTranslatedIndustryTileID(), HouseOverrideManager::SetEntitySpec(), and TryBuildTownHouse().

## ◆ subst_id

uint16_t SubstituteGRFFileProps::subst_id

Definition at line 468 of file newgrf_commons.h.

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

- src/newgrf_commons.h