Add: [NewGRF] Allow badges to be excluded from badge name list. (#14818)
This allows badges to have names that can be filtered, but avoid cluttering the purchase text.
This commit is contained in:
@@ -133,6 +133,7 @@ int DrawBadgeNameList(Rect r, std::span<const BadgeID> badges, GrfSpecFeature)
|
||||
const Badge *badge = GetBadge(index);
|
||||
if (badge == nullptr || badge->name == STR_NULL) continue;
|
||||
if (badge->class_index != class_index) continue;
|
||||
if (badge->flags.Test(BadgeFlag::NameListSkip)) continue;
|
||||
|
||||
if (!s.empty()) {
|
||||
if (badge->flags.Test(BadgeFlag::NameListFirstOnly)) continue;
|
||||
|
||||
Reference in New Issue
Block a user