mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Make BeatmapAvailability
class in-line with other online data structures
This commit is contained in:
@ -20,7 +20,7 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The availability state of the beatmap, set to <see cref="DownloadState.LocallyAvailable"/> by default.
|
/// The availability state of the beatmap, set to <see cref="DownloadState.LocallyAvailable"/> by default.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BeatmapAvailability BeatmapAvailability { get; set; } = new BeatmapAvailability(DownloadState.LocallyAvailable);
|
public BeatmapAvailability BeatmapAvailability { get; set; } = BeatmapAvailability.LocallyAvailable();
|
||||||
|
|
||||||
public User? User { get; set; }
|
public User? User { get; set; }
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ namespace osu.Game.Online.Rooms
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The local availability information about a certain beatmap for the client.
|
/// The local availability information about a certain beatmap for the client.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly struct BeatmapAvailability : IEquatable<BeatmapAvailability>
|
public class BeatmapAvailability : IEquatable<BeatmapAvailability>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The beatmap's availability state.
|
/// The beatmap's availability state.
|
||||||
@ -49,7 +49,7 @@ namespace osu.Game.Online.Rooms
|
|||||||
DownloadProgress = downloadProgress;
|
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%}")}";
|
public override string ToString() => $"{string.Join(", ", State, $"{DownloadProgress:0.00%}")}";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user