mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:07:38 +08:00
Make BeatmapAvailability
class in-line with other online data structures
This commit is contained in:
parent
dfa8be9173
commit
152e9ecccf
@ -20,7 +20,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
/// <summary>
|
||||
/// The availability state of the beatmap, set to <see cref="DownloadState.LocallyAvailable"/> by default.
|
||||
/// </summary>
|
||||
public BeatmapAvailability BeatmapAvailability { get; set; } = new BeatmapAvailability(DownloadState.LocallyAvailable);
|
||||
public BeatmapAvailability BeatmapAvailability { get; set; } = BeatmapAvailability.LocallyAvailable();
|
||||
|
||||
public User? User { get; set; }
|
||||
|
||||
|
@ -8,7 +8,7 @@ namespace osu.Game.Online.Rooms
|
||||
/// <summary>
|
||||
/// The local availability information about a certain beatmap for the client.
|
||||
/// </summary>
|
||||
public readonly struct BeatmapAvailability : IEquatable<BeatmapAvailability>
|
||||
public class BeatmapAvailability : IEquatable<BeatmapAvailability>
|
||||
{
|
||||
/// <summary>
|
||||
/// The beatmap's availability state.
|
||||
@ -49,7 +49,7 @@ namespace osu.Game.Online.Rooms
|
||||
DownloadProgress = downloadProgress;
|
||||
}
|
||||
|
||||
public bool Equals(BeatmapAvailability other) => State == other.State && DownloadProgress == other.DownloadProgress;
|
||||
public bool Equals(BeatmapAvailability other) => other != null && State == other.State && DownloadProgress == other.DownloadProgress;
|
||||
|
||||
public override string ToString() => $"{string.Join(", ", State, $"{DownloadProgress:0.00%}")}";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user