Don't compute keymod difficulties for mania-specific beatmaps

These don't affect the number of keys in the beatmap at all for mania-specific beatmaps.
This commit is contained in:
smoogipoo
2018-06-14 17:04:31 +09:00
parent af218b3d8d
commit 08b9cf75e9

View File

@ -29,9 +29,12 @@ namespace osu.Game.Rulesets.Mania.Difficulty
/// </summary> /// </summary>
private const double decay_weight = 0.9; private const double decay_weight = 0.9;
private readonly bool isForCurrentRuleset;
public ManiaDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap) public ManiaDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap)
: base(ruleset, beatmap) : base(ruleset, beatmap)
{ {
isForCurrentRuleset = beatmap.BeatmapInfo.Ruleset.Equals(new ManiaRuleset().RulesetInfo);
} }
protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double timeRate) protected override DifficultyAttributes Calculate(IBeatmap beatmap, Mod[] mods, double timeRate)
@ -129,7 +132,22 @@ namespace osu.Game.Rulesets.Mania.Difficulty
return difficulty; return difficulty;
} }
protected override Mod[] DifficultyAdjustmentMods => new Mod[] protected override Mod[] DifficultyAdjustmentMods
{
get
{
if (isForCurrentRuleset)
{
return new Mod[]
{
new ManiaModDoubleTime(),
new ManiaModHalfTime(),
new ManiaModEasy(),
new ManiaModHardRock(),
};
}
return new Mod[]
{ {
new ManiaModDoubleTime(), new ManiaModDoubleTime(),
new ManiaModHalfTime(), new ManiaModHalfTime(),
@ -145,6 +163,7 @@ namespace osu.Game.Rulesets.Mania.Difficulty
new ManiaModKey8(), new ManiaModKey8(),
new ManiaModKey9(), new ManiaModKey9(),
}; };
}
}
} }
} }