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

Method GetSpec

src/table/newgrf_debug_data.h:136–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 uint GetParent(uint index) const override { return GetInspectWindowNumber(GSF_FAKE_TOWNS, Station::GetByTile(TileIndex{index})->town->index); }
135 const void *GetInstance(uint ) const override { return nullptr; }
136 const void *GetSpec(uint index) const override { return GetStationSpec(TileIndex{index}); }
137 std::string GetName(uint index) const override { return GetString(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT, STR_STATION_NAME, GetStationIndex(index), index); }
138 uint32_t GetGRFID(uint index) const override { return (this->IsInspectable(index)) ? GetStationSpec(TileIndex{index})->grf_prop.grfid : 0; }
139 std::span<const BadgeID> GetBadges(uint index) const override { return this->IsInspectable(index) ? GetStationSpec(TileIndex{index})->badges : std::span<const BadgeID>{}; }

Callers

nothing calls this directly

Calls 1

GetStationSpecFunction · 0.85

Tested by

no test coverage detected