mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Replace IWorkingBeatmap
arg with BeatmapVerifierContext
in checks
This simplifies passing of contextual information by enabling addition without needing to refactor lots of classes. See next commit for example.
This commit is contained in:
@ -40,6 +40,7 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
|
||||
private IBeatmapVerifier rulesetVerifier;
|
||||
private BeatmapVerifier generalVerifier;
|
||||
private BeatmapVerifierContext context;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colours)
|
||||
@ -57,6 +58,8 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
|
||||
InterpretedDifficulty = new Bindable<DifficultyRating>(beatmap.BeatmapInfo.DifficultyRating);
|
||||
|
||||
context = new BeatmapVerifierContext(workingBeatmap.Value);
|
||||
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
@ -101,10 +104,10 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
|
||||
public void Refresh()
|
||||
{
|
||||
var issues = generalVerifier.Run(beatmap, workingBeatmap.Value);
|
||||
var issues = generalVerifier.Run(beatmap, context);
|
||||
|
||||
if (rulesetVerifier != null)
|
||||
issues = issues.Concat(rulesetVerifier.Run(beatmap, workingBeatmap.Value));
|
||||
issues = issues.Concat(rulesetVerifier.Run(beatmap, context));
|
||||
|
||||
issues = filter(issues);
|
||||
|
||||
|
Reference in New Issue
Block a user