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

Function GetBadgeClassConfiguration

src/newgrf_badge_config.cpp:66–71  ·  view source on GitHub ↗

* Get the badge user configuration for a feature. * @returns badge configuration for the given feature. */

Source from the content-addressed store, hash-verified

64 * @returns badge configuration for the given feature.
65 */
66std::span<BadgeClassConfigItem> GetBadgeClassConfiguration(GrfSpecFeature feature)
67{
68 assert(BadgeClassConfig::CONFIGURABLE_FEATURES.Test(feature));
69 assert(feature < std::size(_badge_config.features));
70 return _badge_config.features[to_underlying(feature)];
71}
72
73/**
74 * Add current badge classes to user configuration.

Callers 4

GetBadgeClassConfigItemFunction · 0.85
BadgeClassMovePreviousFunction · 0.85
BadgeClassMoveNextFunction · 0.85

Calls 3

to_underlyingFunction · 0.85
TestMethod · 0.80
sizeFunction · 0.50

Tested by

no test coverage detected