mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +08:00
Take IWorkingBeatmap
instead of WorkingBeatmap
This makes testing much easier, and allows for checking of any class deriving from that interface, including `WorkingBeatmap`.
This commit is contained in:
parent
abf512532e
commit
56bf49c85c
@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Checks
|
||||
new IssueTemplateOffscreenSlider(this)
|
||||
};
|
||||
|
||||
public IEnumerable<Issue> Run(WorkingBeatmap workingBeatmap)
|
||||
public IEnumerable<Issue> Run(IWorkingBeatmap workingBeatmap)
|
||||
{
|
||||
foreach (var hitobject in workingBeatmap.Beatmap.HitObjects)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
new IssueTemplateDoesNotExist(this)
|
||||
};
|
||||
|
||||
public IEnumerable<Issue> Run(WorkingBeatmap workingBeatmap)
|
||||
public IEnumerable<Issue> Run(IWorkingBeatmap workingBeatmap)
|
||||
{
|
||||
string backgroundFile = workingBeatmap.Beatmap.Metadata?.BackgroundFile;
|
||||
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
new IssueTemplateTooUncompressed(this)
|
||||
};
|
||||
|
||||
public IEnumerable<Issue> Run(WorkingBeatmap workingBeatmap)
|
||||
public IEnumerable<Issue> Run(IWorkingBeatmap workingBeatmap)
|
||||
{
|
||||
var backgroundFile = workingBeatmap.Beatmap.Metadata?.BackgroundFile;
|
||||
if (backgroundFile == null)
|
||||
|
@ -25,6 +25,6 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
/// Runs this check and returns any issues detected for the provided beatmap.
|
||||
/// </summary>
|
||||
/// <param name="workingBeatmap">The beatmap to run the check on.</param>
|
||||
public IEnumerable<Issue> Run(WorkingBeatmap workingBeatmap);
|
||||
public IEnumerable<Issue> Run(IWorkingBeatmap workingBeatmap);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user