Add check/issue classes

This commit is contained in:
Naxess
2021-04-07 14:35:33 +02:00
parent d58ef5310b
commit b24ce66a0d
7 changed files with 314 additions and 10 deletions

View File

@ -0,0 +1,25 @@
// 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 System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Checks;
using osu.Game.Screens.Edit.Verify.Components;
namespace osu.Game.Rulesets.Edit
{
public abstract class Checker
{
// These are all mode-invariant, hence here instead of in e.g. `OsuChecker`.
private readonly List<BeatmapCheck> beatmapChecks = new List<BeatmapCheck>
{
new CheckMetadataVowels()
};
public virtual IEnumerable<Issue> Run(IBeatmap beatmap)
{
return beatmapChecks.SelectMany(check => check.Run(beatmap));
}
}
}