osukey/osu.Game/Rulesets/Edit/BeatmapVerifierContext.cs
Naxess 64d96b06a6 Add interpreted difficulty info to BeatmapVerifierContext
Enables checks to make use of the difficulty level as shown in the settings UI.
2021-05-12 02:30:21 +02:00

32 lines
1.1 KiB
C#

// 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 osu.Framework.Bindables;
using osu.Game.Beatmaps;
namespace osu.Game.Rulesets.Edit
{
/// <summary>
/// Represents the context provided by the beatmap verifier to the checks it runs.
/// Contains information about what is being checked and how it should be checked.
/// </summary>
public class BeatmapVerifierContext
{
/// <summary>
/// The working beatmap instance of the current beatmap.
/// </summary>
public readonly IWorkingBeatmap WorkingBeatmap;
/// <summary>
/// The difficulty level which the current beatmap is considered to be.
/// </summary>
public readonly Bindable<DifficultyRating> InterpretedDifficulty;
public BeatmapVerifierContext(IWorkingBeatmap workingBeatmap, DifficultyRating difficultyRating = DifficultyRating.ExpertPlus)
{
WorkingBeatmap = workingBeatmap;
InterpretedDifficulty = new Bindable<DifficultyRating>(difficultyRating);
}
}
}