mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Local circlesize/od variables
This commit is contained in:
parent
a4d05e5102
commit
f569d54958
@ -37,19 +37,22 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
|||||||
{
|
{
|
||||||
IsForCurrentRuleset = isForCurrentRuleset;
|
IsForCurrentRuleset = isForCurrentRuleset;
|
||||||
|
|
||||||
|
var roundedCircleSize = Math.Round(original.BeatmapInfo.BaseDifficulty.CircleSize);
|
||||||
|
var roundedOverallDifficulty = Math.Round(original.BeatmapInfo.BaseDifficulty.OverallDifficulty);
|
||||||
|
|
||||||
if (isForCurrentRuleset)
|
if (isForCurrentRuleset)
|
||||||
TargetColumns = (int)Math.Max(1, Math.Round(original.BeatmapInfo.BaseDifficulty.CircleSize));
|
TargetColumns = (int)Math.Max(1, roundedCircleSize);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float percentSliderOrSpinner = (float)original.HitObjects.Count(h => h is IHasEndTime) / original.HitObjects.Count;
|
float percentSliderOrSpinner = (float)original.HitObjects.Count(h => h is IHasEndTime) / original.HitObjects.Count;
|
||||||
if (percentSliderOrSpinner < 0.2)
|
if (percentSliderOrSpinner < 0.2)
|
||||||
TargetColumns = 7;
|
TargetColumns = 7;
|
||||||
else if (percentSliderOrSpinner < 0.3 || Math.Round(original.BeatmapInfo.BaseDifficulty.CircleSize) >= 5)
|
else if (percentSliderOrSpinner < 0.3 || roundedCircleSize >= 5)
|
||||||
TargetColumns = Math.Round(original.BeatmapInfo.BaseDifficulty.OverallDifficulty) > 5 ? 7 : 6;
|
TargetColumns = roundedOverallDifficulty > 5 ? 7 : 6;
|
||||||
else if (percentSliderOrSpinner > 0.6)
|
else if (percentSliderOrSpinner > 0.6)
|
||||||
TargetColumns = Math.Round(original.BeatmapInfo.BaseDifficulty.OverallDifficulty) > 4 ? 5 : 4;
|
TargetColumns = roundedOverallDifficulty > 4 ? 5 : 4;
|
||||||
else
|
else
|
||||||
TargetColumns = Math.Max(4, Math.Min((int)Math.Round(original.BeatmapInfo.BaseDifficulty.OverallDifficulty) + 1, 7));
|
TargetColumns = Math.Max(4, Math.Min((int)roundedOverallDifficulty + 1, 7));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user