mirror of
https://github.com/ppy/osu.git
synced 2026-05-13 20:33:35 +08:00
53f945b7ac
The "Key Count" metric in mania is very useless since you are already expected to play maps with a specific Key Count when you are queueing. This PR inserts the proportion of LNs (Long Notes) in the place of that metric since it is one of the ways players can gudge their skillsets (This idea comes from reddit) Also improved the test suite for other skillsets by making the architecture more minor ruleset friendly Addresses https://github.com/ppy/osu/discussions/37568. --------- Co-authored-by: Dan Balasescu <smoogipoo@smgi.me> Co-authored-by: Dean Herbert <pe@ppy.sh>
73 lines
2.8 KiB
C#
73 lines
2.8 KiB
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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
|
|
{
|
|
/// <summary>
|
|
/// A <see cref="RulesetBeatmapAttribute"/> is like a single property from <see cref="BeatmapDifficulty"/>,
|
|
/// but adjusted for display in the context of a specific ruleset.
|
|
/// The reason why this record exists is that rulesets use <see cref="BeatmapDifficulty"/> in different ways.
|
|
/// Some rulesets completely ignore some fields from <see cref="BeatmapDifficulty"/>,
|
|
/// some reuse fields in weird ways (like mania reusing <see cref="BeatmapDifficulty.CircleSize"/> to mean key count),
|
|
/// some want to provide specific extended information for a <see cref="BeatmapDifficulty"/> field
|
|
/// or adjust the "effective display" in different ways.
|
|
/// </summary>
|
|
public class RulesetBeatmapAttribute
|
|
{
|
|
/// <summary>
|
|
/// The long label for this beatmap attribute.
|
|
/// </summary>
|
|
public LocalisableString Label { get; }
|
|
|
|
/// <summary>
|
|
/// A two-letter acronym for this beatmap attribute.
|
|
/// </summary>
|
|
public string Acronym { get; }
|
|
|
|
/// <summary>
|
|
/// The value of this attribute before application of mods.
|
|
/// </summary>
|
|
public float OriginalValue { get; }
|
|
|
|
/// <summary>
|
|
/// The "effective" value of this attribute after application of mods.
|
|
/// </summary>
|
|
public float AdjustedValue { get; }
|
|
|
|
/// <summary>
|
|
/// The highest allowable value of this attribute.
|
|
/// </summary>
|
|
public float MaxValue { get; }
|
|
|
|
/// <summary>
|
|
/// An optional extended description of this attribute.
|
|
/// </summary>
|
|
public LocalisableString? Description { get; init; }
|
|
|
|
/// <summary>
|
|
/// Contains any and all additional metrics about how this attribute affects gameplay to show to the users.
|
|
/// </summary>
|
|
public AdditionalMetric[] AdditionalMetrics { get; init; } = [];
|
|
|
|
/// <summary>
|
|
/// An optional formatting specifier for the values of this attribute.
|
|
/// </summary>
|
|
public string ValueFormat { get; init; } = string.Empty;
|
|
|
|
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);
|
|
}
|
|
}
|