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

Method GetTypeBadges

src/road_gui.cpp:1248–1254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1246 }
1247
1248 std::span<const BadgeID> GetTypeBadges(int cls_id, int id) const override
1249 {
1250 const auto *spec = this->GetSpec(cls_id, id);
1251 if (!IsRoadStopEverAvailable(spec, roadstoptype == RoadStopType::Bus ? StationType::Bus : StationType::Truck)) return {};
1252 if (spec == nullptr) return {};
1253 return spec->badges;
1254 }
1255
1256 bool IsTypeAvailable(int cls_id, int id) const override
1257 {

Callers

nothing calls this directly

Calls 2

IsRoadStopEverAvailableFunction · 0.85
GetSpecMethod · 0.45

Tested by

no test coverage detected