2024-03-22 17:48:22 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using osu.Game.Rulesets.Edit;
|
|
|
|
using osu.Game.Rulesets.Edit.Checks;
|
|
|
|
using osu.Game.Rulesets.Edit.Checks.Components;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Edit.Checks
|
|
|
|
{
|
|
|
|
public class CheckManiaAbnormalDifficultySettings : CheckAbnormalDifficultySettings
|
|
|
|
{
|
|
|
|
public override CheckMetadata Metadata => new CheckMetadata(CheckCategory.Settings, "Checks mania relevant settings");
|
|
|
|
|
|
|
|
public override IEnumerable<Issue> Run(BeatmapVerifierContext context)
|
|
|
|
{
|
|
|
|
var diff = context.Beatmap.Difficulty;
|
2024-03-26 10:13:03 +00:00
|
|
|
Issue? issue;
|
2024-03-22 17:48:22 +00:00
|
|
|
|
2024-03-26 10:13:03 +00:00
|
|
|
if (HasMoreThanOneDecimalPlace("Overall difficulty", diff.OverallDifficulty, out issue))
|
|
|
|
yield return issue;
|
2024-03-22 17:48:22 +00:00
|
|
|
|
2024-03-26 10:13:03 +00:00
|
|
|
if (OutOfRange("Overall difficulty", diff.OverallDifficulty, out issue))
|
|
|
|
yield return issue;
|
2024-03-22 17:48:22 +00:00
|
|
|
|
2024-03-26 10:13:03 +00:00
|
|
|
if (HasMoreThanOneDecimalPlace("Drain rate", diff.DrainRate, out issue))
|
|
|
|
yield return issue;
|
2024-03-22 17:48:22 +00:00
|
|
|
|
2024-03-26 10:13:03 +00:00
|
|
|
if (OutOfRange("Drain rate", diff.DrainRate, out issue))
|
|
|
|
yield return issue;
|
2024-03-22 17:48:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|