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

Method GetTypeName

src/object_gui.cpp:77–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 void SetSelectedType(int id) const override { _object_gui.sel_type = id; }
76
77 StringID GetTypeName(int cls_id, int id) const override
78 {
79 const auto *spec = this->GetSpec(cls_id, id);
80 return (spec == nullptr || !spec->IsEverAvailable()) ? INVALID_STRING_ID : spec->name;
81 }
82
83 std::span<const BadgeID> GetTypeBadges(int cls_id, int id) const override
84 {

Callers

nothing calls this directly

Calls 2

IsEverAvailableMethod · 0.80
GetSpecMethod · 0.45

Tested by

no test coverage detected