mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 09:42:54 +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
|
namespace osu.Game.Rulesets.Catch.Difficulty
|
||||||
{
|
{
|
||||||
|
[JsonObject(MemberSerialization.OptIn)]
|
||||||
public struct CatchDifficultyAttributes : IDifficultyAttributes
|
public struct CatchDifficultyAttributes : IDifficultyAttributes
|
||||||
{
|
{
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
@ -8,6 +8,7 @@ using osu.Game.Rulesets.Difficulty;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Difficulty
|
namespace osu.Game.Rulesets.Mania.Difficulty
|
||||||
{
|
{
|
||||||
|
[JsonObject(MemberSerialization.OptIn)]
|
||||||
public struct ManiaDifficultyAttributes : IDifficultyAttributes
|
public struct ManiaDifficultyAttributes : IDifficultyAttributes
|
||||||
{
|
{
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
@ -9,6 +9,7 @@ using osu.Game.Rulesets.Difficulty;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Difficulty
|
namespace osu.Game.Rulesets.Osu.Difficulty
|
||||||
{
|
{
|
||||||
|
[JsonObject(MemberSerialization.OptIn)]
|
||||||
public struct OsuDifficultyAttributes : IDifficultyAttributes
|
public struct OsuDifficultyAttributes : IDifficultyAttributes
|
||||||
{
|
{
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
@ -8,13 +8,13 @@ using osu.Game.Rulesets.Difficulty;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.Difficulty
|
namespace osu.Game.Rulesets.Taiko.Difficulty
|
||||||
{
|
{
|
||||||
|
[JsonObject(MemberSerialization.OptIn)]
|
||||||
public struct TaikoDifficultyAttributes : IDifficultyAttributes
|
public struct TaikoDifficultyAttributes : IDifficultyAttributes
|
||||||
{
|
{
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public double StarRating { get; set; }
|
public double StarRating { get; set; }
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
[JsonProperty("max_combo", Order = -2)]
|
|
||||||
public int MaxCombo { get; set; }
|
public int MaxCombo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -252,7 +252,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
var performanceCalculator = ruleset.CreatePerformanceCalculator();
|
var performanceCalculator = ruleset.CreatePerformanceCalculator();
|
||||||
if (performanceCalculator == null)
|
if (performanceCalculator == null)
|
||||||
return new StarDifficulty(difficulty, new EmptyPerformanceAttributes());
|
return new StarDifficulty(difficulty, new PerformanceAttributes());
|
||||||
|
|
||||||
ScoreProcessor scoreProcessor = ruleset.CreateScoreProcessor();
|
ScoreProcessor scoreProcessor = ruleset.CreateScoreProcessor();
|
||||||
scoreProcessor.Mods.Value = key.OrderedMods;
|
scoreProcessor.Mods.Value = key.OrderedMods;
|
||||||
|
@ -10,7 +10,6 @@ namespace osu.Game.Rulesets.Difficulty
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes the difficulty of a beatmap, as output by a <see cref="DifficultyCalculator"/>.
|
/// Describes the difficulty of a beatmap, as output by a <see cref="DifficultyCalculator"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonObject(MemberSerialization.OptIn)]
|
|
||||||
public interface IDifficultyAttributes
|
public interface IDifficultyAttributes
|
||||||
{
|
{
|
||||||
protected const int ATTRIB_ID_AIM = 1;
|
protected const int ATTRIB_ID_AIM = 1;
|
||||||
@ -60,7 +59,7 @@ namespace osu.Game.Rulesets.Difficulty
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a full, minimal implementation of <see cref="IDifficultyAttributes"/>.
|
/// Represents a full, minimal implementation of <see cref="IDifficultyAttributes"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EmptyDifficultyAttributes : IDifficultyAttributes
|
public class DifficultyAttributes : IDifficultyAttributes
|
||||||
{
|
{
|
||||||
public double StarRating { get; set; }
|
public double StarRating { get; set; }
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Difficulty
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a full, minimal implementation of <see cref="IPerformanceAttributes"/>.
|
/// Represents a full, minimal implementation of <see cref="IPerformanceAttributes"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EmptyPerformanceAttributes : IPerformanceAttributes
|
public class PerformanceAttributes : IPerformanceAttributes
|
||||||
{
|
{
|
||||||
public double Total { get; set; }
|
public double Total { get; set; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user