From 64d96b06a66c9f35026b925573b9f3fc7ebfb72d Mon Sep 17 00:00:00 2001
From: Naxess <30292137+Naxesss@users.noreply.github.com>
Date: Wed, 12 May 2021 02:30:21 +0200
Subject: [PATCH] Add interpreted difficulty info to `BeatmapVerifierContext`
Enables checks to make use of the difficulty level as shown in the settings UI.
---
osu.Game/Rulesets/Edit/BeatmapVerifierContext.cs | 8 +++++++-
osu.Game/Screens/Edit/Verify/IssueList.cs | 1 +
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/osu.Game/Rulesets/Edit/BeatmapVerifierContext.cs b/osu.Game/Rulesets/Edit/BeatmapVerifierContext.cs
index 86ca81491a..59d43ba3d6 100644
--- a/osu.Game/Rulesets/Edit/BeatmapVerifierContext.cs
+++ b/osu.Game/Rulesets/Edit/BeatmapVerifierContext.cs
@@ -17,9 +17,15 @@ namespace osu.Game.Rulesets.Edit
///
public readonly IWorkingBeatmap WorkingBeatmap;
- public BeatmapVerifierContext(IWorkingBeatmap workingBeatmap)
+ ///
+ /// The difficulty level which the current beatmap is considered to be.
+ ///
+ public readonly Bindable InterpretedDifficulty;
+
+ public BeatmapVerifierContext(IWorkingBeatmap workingBeatmap, DifficultyRating difficultyRating = DifficultyRating.ExpertPlus)
{
WorkingBeatmap = workingBeatmap;
+ InterpretedDifficulty = new Bindable(difficultyRating);
}
}
}
diff --git a/osu.Game/Screens/Edit/Verify/IssueList.cs b/osu.Game/Screens/Edit/Verify/IssueList.cs
index 96d056fba4..2ae86ed198 100644
--- a/osu.Game/Screens/Edit/Verify/IssueList.cs
+++ b/osu.Game/Screens/Edit/Verify/IssueList.cs
@@ -59,6 +59,7 @@ namespace osu.Game.Screens.Edit.Verify
InterpretedDifficulty = new Bindable(beatmap.BeatmapInfo.DifficultyRating);
context = new BeatmapVerifierContext(workingBeatmap.Value);
+ context.InterpretedDifficulty.BindTo(InterpretedDifficulty);
RelativeSizeAxes = Axes.Both;