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

Method GetTypeBadges

src/object_gui.cpp:83–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 std::span<const BadgeID> GetTypeBadges(int cls_id, int id) const override
84 {
85 const auto *spec = this->GetSpec(cls_id, id);
86 if (spec == nullptr || !spec->IsEverAvailable()) return {};
87 return spec->badges;
88 }
89
90 bool IsTypeAvailable(int cls_id, int id) const override
91 {

Callers

nothing calls this directly

Calls 2

IsEverAvailableMethod · 0.80
GetSpecMethod · 0.45

Tested by

no test coverage detected