1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 20:22:55 +08:00

Remove mods from constructor

This commit is contained in:
smoogipoo 2019-02-19 13:40:39 +09:00
parent a8faa942a6
commit af0bb4d5e8
2 changed files with 5 additions and 6 deletions

View File

@ -7,13 +7,12 @@ namespace osu.Game.Rulesets.Difficulty
{ {
public class DifficultyAttributes public class DifficultyAttributes
{ {
public readonly Mod[] Mods; public Mod[] Mods;
public double StarRating; public double StarRating;
public DifficultyAttributes(Mod[] mods) public DifficultyAttributes()
{ {
Mods = mods;
} }
public DifficultyAttributes(Mod[] mods, double starRating) public DifficultyAttributes(Mod[] mods, double starRating)

View File

@ -25,7 +25,8 @@ namespace osu.Game.Rulesets.Difficulty
protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double timeRate) protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double timeRate)
{ {
var attributes = CreateDifficultyAttributes(mods); var attributes = CreateDifficultyAttributes();
attributes.Mods = mods;
if (!beatmap.HitObjects.Any()) if (!beatmap.HitObjects.Any())
return attributes; return attributes;
@ -132,8 +133,7 @@ namespace osu.Game.Rulesets.Difficulty
/// <summary> /// <summary>
/// Creates an empty <see cref="DifficultyAttributes"/>. /// Creates an empty <see cref="DifficultyAttributes"/>.
/// </summary> /// </summary>
/// <param name="mods">The <see cref="Mod"/>s which difficulty is being processed with.</param>
/// <returns>The empty <see cref="DifficultyAttributes"/>.</returns> /// <returns>The empty <see cref="DifficultyAttributes"/>.</returns>
protected abstract DifficultyAttributes CreateDifficultyAttributes(Mod[] mods); protected abstract DifficultyAttributes CreateDifficultyAttributes();
} }
} }