mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 10:33:22 +08:00
Rename empty attributes, make attributes json OptIn
This commit is contained in:
parent
26e9c21d9a
commit
d12fd89f44
@ -8,6 +8,7 @@ using osu.Game.Rulesets.Difficulty;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Difficulty
|
||||
{
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public struct CatchDifficultyAttributes : IDifficultyAttributes
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
|
@ -8,6 +8,7 @@ using osu.Game.Rulesets.Difficulty;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Difficulty
|
||||
{
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public struct ManiaDifficultyAttributes : IDifficultyAttributes
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
|
@ -9,6 +9,7 @@ using osu.Game.Rulesets.Difficulty;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
{
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public struct OsuDifficultyAttributes : IDifficultyAttributes
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -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; }
|
||||
|
||||
|
@ -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; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user