1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 02:53:21 +08:00

Rename empty attributes, make attributes json OptIn

This commit is contained in:
minisbett 2024-11-21 19:45:37 +01:00
parent 26e9c21d9a
commit d12fd89f44
No known key found for this signature in database
GPG Key ID: 2DB6D529C95A0403
7 changed files with 7 additions and 5 deletions

View File

@ -8,6 +8,7 @@ using osu.Game.Rulesets.Difficulty;
namespace osu.Game.Rulesets.Catch.Difficulty
{
[JsonObject(MemberSerialization.OptIn)]
public struct CatchDifficultyAttributes : IDifficultyAttributes
{
/// <inheritdoc/>

View File

@ -8,6 +8,7 @@ using osu.Game.Rulesets.Difficulty;
namespace osu.Game.Rulesets.Mania.Difficulty
{
[JsonObject(MemberSerialization.OptIn)]
public struct ManiaDifficultyAttributes : IDifficultyAttributes
{
/// <inheritdoc/>

View File

@ -9,6 +9,7 @@ using osu.Game.Rulesets.Difficulty;
namespace osu.Game.Rulesets.Osu.Difficulty
{
[JsonObject(MemberSerialization.OptIn)]
public struct OsuDifficultyAttributes : IDifficultyAttributes
{
/// <inheritdoc/>

View File

@ -8,13 +8,13 @@ using osu.Game.Rulesets.Difficulty;
namespace osu.Game.Rulesets.Taiko.Difficulty
{
[JsonObject(MemberSerialization.OptIn)]
public struct TaikoDifficultyAttributes : IDifficultyAttributes
{
/// <inheritdoc/>
public double StarRating { get; set; }
/// <inheritdoc/>
[JsonProperty("max_combo", Order = -2)]
public int MaxCombo { get; set; }
/// <summary>

View File

@ -252,7 +252,7 @@ namespace osu.Game.Beatmaps
var performanceCalculator = ruleset.CreatePerformanceCalculator();
if (performanceCalculator == null)
return new StarDifficulty(difficulty, new EmptyPerformanceAttributes());
return new StarDifficulty(difficulty, new PerformanceAttributes());
ScoreProcessor scoreProcessor = ruleset.CreateScoreProcessor();
scoreProcessor.Mods.Value = key.OrderedMods;

View File

@ -10,7 +10,6 @@ namespace osu.Game.Rulesets.Difficulty
/// <summary>
/// Describes the difficulty of a beatmap, as output by a <see cref="DifficultyCalculator"/>.
/// </summary>
[JsonObject(MemberSerialization.OptIn)]
public interface IDifficultyAttributes
{
protected const int ATTRIB_ID_AIM = 1;
@ -60,7 +59,7 @@ namespace osu.Game.Rulesets.Difficulty
/// <summary>
/// Represents a full, minimal implementation of <see cref="IDifficultyAttributes"/>.
/// </summary>
public class EmptyDifficultyAttributes : IDifficultyAttributes
public class DifficultyAttributes : IDifficultyAttributes
{
public double StarRating { get; set; }

View File

@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Difficulty
/// <summary>
/// Represents a full, minimal implementation of <see cref="IPerformanceAttributes"/>.
/// </summary>
public class EmptyPerformanceAttributes : IPerformanceAttributes
public class PerformanceAttributes : IPerformanceAttributes
{
public double Total { get; set; }