mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
File name should be nullable.
This commit is contained in:
parent
db48a57fa7
commit
505ec800da
@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
{
|
||||
protected override CheckCategory Category => CheckCategory.Audio;
|
||||
protected override string TypeOfFile => "audio";
|
||||
protected override string GetFilename(IBeatmap beatmap) => beatmap.Metadata?.AudioFile;
|
||||
protected override string? GetFilename(IBeatmap beatmap) => beatmap.Metadata?.AudioFile;
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
{
|
||||
protected override CheckCategory Category => CheckCategory.Resources;
|
||||
protected override string TypeOfFile => "background";
|
||||
protected override string GetFilename(IBeatmap beatmap) => beatmap.Metadata?.BackgroundFile;
|
||||
protected override string? GetFilename(IBeatmap beatmap) => beatmap.Metadata?.BackgroundFile;
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
{
|
||||
protected abstract CheckCategory Category { get; }
|
||||
protected abstract string TypeOfFile { get; }
|
||||
protected abstract string GetFilename(IBeatmap beatmap);
|
||||
protected abstract string? GetFilename(IBeatmap beatmap);
|
||||
|
||||
public CheckMetadata Metadata => new CheckMetadata(Category, $"Missing {TypeOfFile}");
|
||||
|
||||
@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
|
||||
public IEnumerable<Issue> Run(BeatmapVerifierContext context)
|
||||
{
|
||||
string filename = GetFilename(context.Beatmap);
|
||||
string? filename = GetFilename(context.Beatmap);
|
||||
|
||||
if (string.IsNullOrEmpty(filename))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user