Simplify verifier run call args

Uses the resolved working beatmap instead of resolving it every time.

Also uses the EditorBeatmap itself as playable beatmap, as it is of type `IBeatmap` already, and `.PlayableBeatmap` forwards everything anyway.
This commit is contained in:
Naxess 2021-04-20 13:34:12 +02:00
parent c0318a4d3e
commit 3e1b6b3b34

View File

@ -61,7 +61,7 @@ namespace osu.Game.Screens.Edit.Verify
private EditorClock clock { get; set; }
[Resolved]
private BeatmapManager beatmapManager { get; set; }
private IBindable<WorkingBeatmap> workingBeatmap { get; set; }
[Resolved]
private EditorBeatmap beatmap { get; set; }
@ -122,11 +122,10 @@ namespace osu.Game.Screens.Edit.Verify
private void refresh()
{
var workingBeatmap = beatmapManager.GetWorkingBeatmap(beatmap.BeatmapInfo);
var issues = generalVerifier.Run(beatmap.PlayableBeatmap, workingBeatmap);
var issues = generalVerifier.Run(beatmap, workingBeatmap.Value);
if (rulesetVerifier != null)
issues = issues.Concat(rulesetVerifier.Run(beatmap.PlayableBeatmap, workingBeatmap));
issues = issues.Concat(rulesetVerifier.Run(beatmap, workingBeatmap.Value));
table.Issues = issues
.OrderBy(issue => issue.Template.Type)