Add AdjustRank and use it in Hidden Mod

This commit is contained in:
KingLuigi4932
2019-04-25 13:56:57 +03:00
parent cfb3c38c3a
commit c6b3197dd0
8 changed files with 48 additions and 21 deletions

View File

@ -9,6 +9,7 @@ using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
namespace osu.Game.Rulesets.Mods
{
@ -35,7 +36,22 @@ namespace osu.Game.Rulesets.Mods
public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
{
scoreProcessor.AdjustRank = true;
// Default value of ScoreProcessor's Rank in Hidden Mod should bes SS+
scoreProcessor.Rank.Value = ScoreRank.XH;
}
// TODO: Other mods that uses AdjustRank might have some issues due to rank changes
public ScoreRank AdjustRank(ScoreRank rank, double accuracy)
{
switch (rank)
{
case ScoreRank.X:
return ScoreRank.XH;
case ScoreRank.S:
return ScoreRank.SH;
default:
return rank;
}
}
protected virtual void ApplyHiddenState(DrawableHitObject hitObject, ArmedState state)