mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Add GetPathForFile
to BeatmapSetInfo
This is used in several places, and so should probably have a function rather than remaining as duplicated code. Also applies this together with the previous commit to `BeatmapManagerWorkingBeatmap`.
This commit is contained in:
@ -59,6 +59,8 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public string StoryboardFile => Files?.Find(f => f.Filename.EndsWith(".osb", StringComparison.OrdinalIgnoreCase))?.Filename;
|
||||
|
||||
public string GetPathForFile(string filename) => Files?.SingleOrDefault(f => string.Equals(f.Filename, filename, StringComparison.OrdinalIgnoreCase))?.FileInfo.StoragePath;
|
||||
|
||||
public List<BeatmapSetFileInfo> Files { get; set; }
|
||||
|
||||
public override string ToString() => Metadata?.ToString() ?? base.ToString();
|
||||
|
Reference in New Issue
Block a user