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 readonly Mod[] Mods;
public Mod[] Mods;
public double StarRating;
public DifficultyAttributes(Mod[] mods)
public DifficultyAttributes()
{
Mods = mods;
}
public DifficultyAttributes(Mod[] mods, double starRating)

View File

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