OpenTTD Source: GRFFilePropsBase< Tcnt > Struct Template Reference

OpenTTD Source 15.0-beta1

Public Member Functions | Data Fields
GRFFilePropsBase< Tcnt > Struct Template Reference

Data related to the handling of grf files. More...

`#include <newgrf_commons.h>`

## Public Member Functions
bool | HasGrfFile () const
| Test if this entity was introduced by NewGRF.

## Data Fields
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
std::array< const struct SpriteGroup *, Tcnt > | spritegroup {}
| pointers to the different sprites of the entity

## Detailed Description

template<size_t Tcnt>
struct GRFFilePropsBase< Tcnt >

Data related to the handling of grf files.

Template Parameters

  Tcnt | Number of spritegroups

Definition at line 310 of file newgrf_commons.h.

## Member Function Documentation

## ◆ HasGrfFile()

template<size_t Tcnt>

bool GRFFilePropsBase< Tcnt >::HasGrfFile | ( |  | ) | const
| inline

Test if this entity was introduced by NewGRF.

Returns
  true iff the grfid property is set.

Definition at line 320 of file newgrf_commons.h.

Referenced by IndustryOverrideManager::AddEntityID(), BuildObjectWindow::DrawWidget(), FinaliseIndustriesArray(), GetNewEngine(), GetObjectIDAtOffset(), HouseScopeResolver::GetVariable(), NIHHouse::IsInspectable(), NIHIndustryTile::IsInspectable(), NIHIndustry::IsInspectable(), NIHObject::IsInspectable(), NIHAirportTile::IsInspectable(), NIHAirport::IsInspectable(), SearchNearbyHouseClass(), SearchNearbyHouseGRFID(), and SearchNearbyHouseID().

## Field Documentation

## ◆ grffile

template<size_t Tcnt>

const struct GRFFile* GRFFilePropsBase< Tcnt >::grffile = nullptr

grf file that introduced this entity

Definition at line 313 of file newgrf_commons.h.

Referenced by AddAcceptedCargoOfHouse(), CheckIfCallBackAllowsCreation(), CmdBuildObject(), CmdBuildRailStation(), CmdBuildRoadStop(), DoCreateNewIndustry(), BuildObjectWindow::DrawWidget(), FinaliseEngineArray(), GetAllCargoSuffixes(), ObjectSpec::GetBuildCost(), RoadStopSpec::GetBuildCost(), GetCargoSuffix(), GetCargoSuffix(), ObjectSpec::GetClearCost(), RoadStopSpec::GetClearCost(), GetFoundation_Town(), Engine::GetGRF(), GetGrffile(), GetHouseName(), GetHouseSpecGrf(), GetIndTileGrffile(), GetIndustryProbabilityCallback(), GetNewEngine(), HouseScopeResolver::GetVariable(), RoadStopScopeResolver::GetVariable(), StationScopeResolver::GetVariable(), IndustryProductionCallback(), IndustryTemporarilyRefusesCargo(), IsRoadStopAvailable(), IsStationAvailable(), PerformIndustryTileSlopeCheck(), PerformStationTileSlopeCheck(), SetEngineGRF(), TileLoop_Town(), and TryBuildTownHouse().

## ◆ grfid

template<size_t Tcnt>

uint32_t GRFFilePropsBase< Tcnt >::grfid = 0

grfid that introduced this entity.

Definition at line 312 of file newgrf_commons.h.

Referenced by AllocateSpecToStation(), BuildObject(), ChangeIndustryProduction(), CmdBuildRailStation(), CommitVehicleListOrderChanges(), DoCreateNewIndustry(), BuildObjectWindow::DrawWidget(), EnginePreSort(), FinaliseIndustriesArray(), GetAirportTextCallback(), GetAirportTileIDAtOffset(), GetCargoSuffix(), GetCountAndDistanceOfClosestInstance(), NIHStation::GetGRFID(), NIHHouse::GetGRFID(), NIHIndustryTile::GetGRFID(), NIHIndustry::GetGRFID(), NIHObject::GetGRFID(), NIHAirportTile::GetGRFID(), NIHAirport::GetGRFID(), NIHRoadStop::GetGRFID(), GetIndustryIDAtOffset(), GetIndustryProbabilityCallback(), GetNewEngine(), GetObjectIDAtOffset(), HouseScopeResolver::GetVariable(), IndustriesScopeResolver::GetVariable(), MoveWaypointsToBaseStations(), SearchNearbyHouseClass(), SearchNearbyHouseGRFID(), SearchNearbyHouseID(), SetEngineGRF(), HouseOverrideManager::SetEntitySpec(), IndustryOverrideManager::SetEntitySpec(), ObjectOverrideManager::SetEntitySpec(), IndustriesScopeResolver::StorePSA(), HousePickerCallbacks::UpdateSavedItems(), and VehicleLengthChanged().

## ◆ local_id

template<size_t Tcnt>

uint16_t GRFFilePropsBase< Tcnt >::local_id = 0

id defined by the grf file for this entity

Definition at line 311 of file newgrf_commons.h.

Referenced by AllocateSpecToStation(), CommitVehicleListOrderChanges(), BuildObjectWindow::DrawWidget(), EnginePreSort(), FinaliseEngineArray(), GetAirportTileIDAtOffset(), AirportResolverObject::GetDebugID(), AirportTileResolverObject::GetDebugID(), HouseResolverObject::GetDebugID(), IndustriesResolverObject::GetDebugID(), IndustryTileResolverObject::GetDebugID(), ObjectResolverObject::GetDebugID(), StationResolverObject::GetDebugID(), GetIndustryIDAtOffset(), GetObjectIDAtOffset(), HouseScopeResolver::GetVariable(), IndustriesScopeResolver::GetVariable(), IsHouseSpecValid(), MoveWaypointsToBaseStations(), ResetObjects(), SearchNearbyHouseID(), HouseOverrideManager::SetEntitySpec(), IndustryOverrideManager::SetEntitySpec(), ObjectOverrideManager::SetEntitySpec(), HousePickerCallbacks::UpdateSavedItems(), and VehicleLengthChanged().

## ◆ spritegroup

template<size_t Tcnt>

std::array<const struct SpriteGroup *, Tcnt> GRFFilePropsBase< Tcnt >::spritegroup {}

pointers to the different sprites of the entity

Definition at line 314 of file newgrf_commons.h.

Referenced by AirportResolverObject::AirportResolverObject(), AirportTileResolverObject::AirportTileResolverObject(), DoTriggerIndustryTile(), DrawHouseInGUI(), GetAirportTileIDAtOffset(), GetFoundation_Town(), GetIndustryIDAtOffset(), HouseResolverObject::HouseResolverObject(), IndustriesResolverObject::IndustriesResolverObject(), IndustryTileResolverObject::IndustryTileResolverObject(), ObjectResolverObject::ObjectResolverObject(), StationResolverObject::StationResolverObject(), and VehicleResolverObject::VehicleResolverObject().

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

- src/newgrf_commons.h