MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetRoadStopSpec

Function GetRoadStopSpec

src/newgrf_roadstop.cpp:553–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

551}
552
553const RoadStopSpec *GetRoadStopSpec(TileIndex t)
554{
555 if (!IsCustomRoadStopSpecIndex(t)) return nullptr;
556
557 const BaseStation *st = BaseStation::GetByTile(t);
558 uint specindex = GetCustomRoadStopSpecIndex(t);
559 return specindex < st->roadstop_speclist.size() ? st->roadstop_speclist[specindex].spec : nullptr;
560}
561
562/**
563 * Allocate a RoadStopSpec to a Station. This is called once per build operation.

Callers 12

AnimateRoadStopTileFunction · 0.85
TriggerRoadStopAnimationFunction · 0.85
RemoveRoadStopFunction · 0.85
RemoveRoadWaypointStopFunction · 0.85
DrawTile_StationFunction · 0.85
CheckBuildAbove_StationFunction · 0.85
IsInspectableMethod · 0.85
GetSpecMethod · 0.85
GetGRFIDMethod · 0.85
GetBadgesMethod · 0.85
ResolveMethod · 0.85

Calls 3

sizeMethod · 0.45

Tested by

no test coverage detected