mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 23:12:56 +08:00
refactor mod to make use of #7175
This commit is contained in:
parent
7f659cd057
commit
ababe7b6c9
@ -65,12 +65,24 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
Precision = 0.1F,
|
Precision = 0.1F,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private BeatmapDifficulty difficulty;
|
||||||
|
|
||||||
public virtual void ApplyToDifficulty(BeatmapDifficulty difficulty)
|
public virtual void ApplyToDifficulty(BeatmapDifficulty difficulty)
|
||||||
{
|
{
|
||||||
difficulty.DrainRate = DrainRate.Value;
|
if (this.difficulty == null || this.difficulty.ID != difficulty.ID)
|
||||||
difficulty.CircleSize = CircleSize.Value;
|
{
|
||||||
difficulty.ApproachRate = ApproachRate.Value;
|
this.difficulty = difficulty;
|
||||||
difficulty.OverallDifficulty = OverallDifficulty.Value;
|
DrainRate.Value = DrainRate.Default = difficulty.DrainRate;
|
||||||
|
CircleSize.Value = CircleSize.Default = difficulty.CircleSize;
|
||||||
|
ApproachRate.Value = ApproachRate.Default = difficulty.ApproachRate;
|
||||||
|
OverallDifficulty.Value = OverallDifficulty.Default = difficulty.OverallDifficulty;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
difficulty.DrainRate = DrainRate.Value;
|
||||||
|
difficulty.CircleSize = CircleSize.Value;
|
||||||
|
difficulty.ApproachRate = ApproachRate.Value;
|
||||||
|
difficulty.OverallDifficulty = OverallDifficulty.Value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user