mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +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:
@ -26,13 +26,13 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
new IssueTemplateNoBitrate(this)
|
||||
};
|
||||
|
||||
public IEnumerable<Issue> Run(IBeatmap playableBeatmap, IWorkingBeatmap workingBeatmap)
|
||||
public IEnumerable<Issue> Run(IBeatmap playableBeatmap, BeatmapVerifierContext context)
|
||||
{
|
||||
var audioFile = playableBeatmap.Metadata?.AudioFile;
|
||||
if (audioFile == null)
|
||||
yield break;
|
||||
|
||||
var track = workingBeatmap.Track;
|
||||
var track = context.WorkingBeatmap.Track;
|
||||
|
||||
if (track?.Bitrate == null || track.Bitrate.Value == 0)
|
||||
yield return new IssueTemplateNoBitrate(this).Create();
|
||||
|
Reference in New Issue
Block a user