mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 22:35:23 +08:00
Fix Max
lookup methods not checking for zero beatmap count
This commit is contained in:
parent
dcd69e852e
commit
0793b0f0ab
@ -50,11 +50,11 @@ namespace osu.Game.Beatmaps
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Protected { get; set; }
|
public bool Protected { get; set; }
|
||||||
|
|
||||||
public double MaxStarDifficulty => Beatmaps.Max(b => b.StarRating);
|
public double MaxStarDifficulty => Beatmaps.Count == 0 ? 0 : Beatmaps.Max(b => b.StarRating);
|
||||||
|
|
||||||
public double MaxLength => Beatmaps.Max(b => b.Length);
|
public double MaxLength => Beatmaps.Count == 0 ? 0 : Beatmaps.Max(b => b.Length);
|
||||||
|
|
||||||
public double MaxBPM => Beatmaps.Max(b => b.BPM);
|
public double MaxBPM => Beatmaps.Count == 0 ? 0 : Beatmaps.Max(b => b.BPM);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the storage path for the file in this beatmapset with the given filename, if any exists, otherwise null.
|
/// Returns the storage path for the file in this beatmapset with the given filename, if any exists, otherwise null.
|
||||||
|
Loading…
Reference in New Issue
Block a user