OpenTTD Source 20250506-master-g22fedca77e
|
Base data related to the handling of grf files. More...
#include <newgrf_commons.h>
Public Member Functions | |
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 | 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 | |
Base data related to the handling of grf files.
Definition at line 316 of file newgrf_commons.h.
|
inline |
Test if this entity was introduced by NewGRF.
Definition at line 327 of file newgrf_commons.h.
Referenced by IndustryOverrideManager::AddEntityID(), BuildObjectWindow::DrawWidget(), GetDistanceFromNearbyHouse(), GetNewEngine(), GetObjectIDAtOffset(), HouseScopeResolver::GetVariable(), NIHHouse::IsInspectable(), NIHIndustryTile::IsInspectable(), NIHIndustry::IsInspectable(), NIHAirportTile::IsInspectable(), NIHAirport::IsInspectable(), and BuildIndustryWindow::UpdateWidgetSize().
void GRFFilePropsBase::SetGRFFile | ( | const struct GRFFile * | grffile | ) |
Set the NewGRF file, and its grfid, associated with grf props.
grffile | GRFFile to set. |
Definition at line 729 of file newgrf_commons.cpp.
References grffile, and grfid.
Referenced by GetNewEngine(), and SetEngineGRF().
const struct GRFFile* GRFFilePropsBase::grffile = nullptr |
grf file that introduced this entity
Definition at line 319 of file newgrf_commons.h.
Referenced by AddAcceptedCargoOfHouse(), CheckIfCallBackAllowsCreation(), CmdBuildObject(), CmdBuildRailStation(), CmdBuildRoadStop(), DoCreateNewIndustry(), IndustryViewWindow::DrawInfo(), BuildIndustryWindow::DrawWidget(), BuildObjectWindow::DrawWidget(), GetAllCargoSuffixes(), ObjectSpec::GetBuildCost(), RoadStopSpec::GetBuildCost(), GetCargoSuffix(), GetCargoSuffix(), ObjectSpec::GetClearCost(), RoadStopSpec::GetClearCost(), GetFoundation_Town(), Engine::GetGRF(), GetGrffile(), GetHouseName(), GetHouseSpecGrf(), GetIndTileGrffile(), GetIndustryProbabilityCallback(), GetProducedCargoOfHouse(), HouseScopeResolver::GetVariable(), RoadStopScopeResolver::GetVariable(), StationScopeResolver::GetVariable(), IndustryProductionCallback(), IndustryTemporarilyRefusesCargo(), IsRoadStopAvailable(), IsStationAvailable(), PerformIndustryTileSlopeCheck(), PerformStationTileSlopeCheck(), SetGRFFile(), TileLoop_Town(), and TryBuildTownHouse().
uint32_t GRFFilePropsBase::grfid = 0 |
grfid that introduced this entity.
Definition at line 318 of file newgrf_commons.h.
Referenced by AllocateSpecToStation(), BuildObject(), ChangeIndustryProduction(), CmdBuildRailStation(), CommitVehicleListOrderChanges(), DoCreateNewIndustry(), IndustryViewWindow::DrawInfo(), BuildIndustryWindow::DrawWidget(), BuildObjectWindow::DrawWidget(), EnginePreSort(), GetAirportTextCallback(), GetAirportTileIDAtOffset(), GetCargoSuffix(), GetCountAndDistanceOfClosestInstance(), GetDistanceFromNearbyHouse(), NIHHouse::GetGRFID(), NIHIndustryTile::GetGRFID(), NIHIndustry::GetGRFID(), NIHAirportTile::GetGRFID(), NIHAirport::GetGRFID(), GetIndustryIDAtOffset(), GetIndustryProbabilityCallback(), GetObjectIDAtOffset(), HouseScopeResolver::GetVariable(), IndustriesScopeResolver::GetVariable(), MoveWaypointsToBaseStations(), SetGRFFile(), IndustriesScopeResolver::StorePSA(), HousePickerCallbacks::UpdateSavedItems(), and VehicleLengthChanged().
uint16_t GRFFilePropsBase::local_id = 0 |
id defined by the grf file for this entity
Definition at line 317 of file newgrf_commons.h.
Referenced by AllocateSpecToStation(), CommitVehicleListOrderChanges(), BuildObjectWindow::DrawWidget(), EnginePreSort(), GetAirportTileIDAtOffset(), AirportResolverObject::GetDebugID(), AirportTileResolverObject::GetDebugID(), HouseResolverObject::GetDebugID(), IndustriesResolverObject::GetDebugID(), IndustryTileResolverObject::GetDebugID(), ObjectResolverObject::GetDebugID(), StationResolverObject::GetDebugID(), GetDistanceFromNearbyHouse(), GetIndustryIDAtOffset(), GetObjectIDAtOffset(), HouseScopeResolver::GetVariable(), IndustriesScopeResolver::GetVariable(), IsHouseSpecValid(), MoveWaypointsToBaseStations(), ResetObjects(), HousePickerCallbacks::UpdateSavedItems(), and VehicleLengthChanged().