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

Method GetParent

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

Source from the content-addressed store, hash-verified

421class NIHObject : public NIHelper {
422 bool IsInspectable(uint index) const override { return ObjectSpec::GetByTile(TileIndex{index})->grf_prop.HasGrfFile(); }
423 uint GetParent(uint index) const override { return GetInspectWindowNumber(GSF_FAKE_TOWNS, Object::GetByTile(TileIndex{index})->town->index); }
424 const void *GetInstance(uint index)const override { return Object::GetByTile(TileIndex{index}); }
425 const void *GetSpec(uint index) const override { return ObjectSpec::GetByTile(TileIndex{index}); }
426 std::string GetName(uint index) const override { return GetString(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT, STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_OBJECT, INVALID_STRING_ID, index); }

Callers

nothing calls this directly

Calls 1

GetInspectWindowNumberFunction · 0.85

Tested by

no test coverage detected