// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Framework.Localisation; using osu.Game.Beatmaps; namespace osu.Game.Rulesets.Difficulty { /// /// A is like a single property from , /// but adjusted for display in the context of a specific ruleset. /// The reason why this record exists is that rulesets use in different ways. /// Some rulesets completely ignore some fields from , /// some reuse fields in weird ways (like mania reusing to mean key count), /// some want to provide specific extended information for a field /// or adjust the "effective display" in different ways. /// public class RulesetBeatmapAttribute { /// /// The long label for this beatmap attribute. /// public LocalisableString Label { get; } /// /// A two-letter acronym for this beatmap attribute. /// public string Acronym { get; } /// /// The value of this attribute before application of mods. /// public float OriginalValue { get; } /// /// The "effective" value of this attribute after application of mods. /// public float AdjustedValue { get; } /// /// The highest allowable value of this attribute. /// public float MaxValue { get; } /// /// An optional extended description of this attribute. /// public LocalisableString? Description { get; init; } /// /// Contains any and all additional metrics about how this attribute affects gameplay to show to the users. /// public AdditionalMetric[] AdditionalMetrics { get; init; } = []; public RulesetBeatmapAttribute(LocalisableString label, string acronym, float originalValue, float adjustedValue, float maxValue) { Label = label; Acronym = acronym; OriginalValue = originalValue; AdjustedValue = adjustedValue; MaxValue = maxValue; } public record AdditionalMetric(LocalisableString Name, LocalisableString Value, Colour4? Colour = null); } }