mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Rename class to better match purpose
This commit is contained in:
parent
fabb0eeb29
commit
1d8de2f718
@ -28,7 +28,7 @@ using osu.Game.Tests.Visual;
|
||||
namespace osu.Game.Tests.Online
|
||||
{
|
||||
[HeadlessTest]
|
||||
public class TestSceneMultiplayerBeatmapTracker : OsuTestScene
|
||||
public class TestSceneMultiplayerBeatmapAvailabilityTracker : OsuTestScene
|
||||
{
|
||||
private RulesetStore rulesets;
|
||||
private TestBeatmapManager beatmaps;
|
||||
@ -38,7 +38,7 @@ namespace osu.Game.Tests.Online
|
||||
private BeatmapSetInfo testBeatmapSet;
|
||||
|
||||
private readonly Bindable<PlaylistItem> selectedItem = new Bindable<PlaylistItem>();
|
||||
private MultiplayerBeatmapTracker tracker;
|
||||
private MultiplayerBeatmapAvailablilityTracker availablilityTracker;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, GameHost host)
|
||||
@ -67,7 +67,7 @@ namespace osu.Game.Tests.Online
|
||||
Ruleset = { Value = testBeatmapInfo.Ruleset },
|
||||
};
|
||||
|
||||
Child = tracker = new MultiplayerBeatmapTracker
|
||||
Child = availablilityTracker = new MultiplayerBeatmapAvailablilityTracker
|
||||
{
|
||||
SelectedItem = { BindTarget = selectedItem, }
|
||||
};
|
||||
@ -118,7 +118,7 @@ namespace osu.Game.Tests.Online
|
||||
});
|
||||
addAvailabilityCheckStep("state still not downloaded", BeatmapAvailability.NotDownloaded);
|
||||
|
||||
AddStep("recreate tracker", () => Child = tracker = new MultiplayerBeatmapTracker
|
||||
AddStep("recreate tracker", () => Child = availablilityTracker = new MultiplayerBeatmapAvailablilityTracker
|
||||
{
|
||||
SelectedItem = { BindTarget = selectedItem }
|
||||
});
|
||||
@ -129,7 +129,7 @@ namespace osu.Game.Tests.Online
|
||||
{
|
||||
// In DownloadTrackingComposite, state changes are scheduled one frame later, wait one step.
|
||||
AddWaitStep("wait for potential change", 1);
|
||||
AddAssert(description, () => tracker.Availability.Value.Equals(expected.Invoke()));
|
||||
AddAssert(description, () => availablilityTracker.Availability.Value.Equals(expected.Invoke()));
|
||||
}
|
||||
|
||||
private static BeatmapInfo getTestBeatmapInfo(string archiveFile)
|
@ -15,7 +15,7 @@ namespace osu.Game.Online.Rooms
|
||||
/// This differs from a regular download tracking composite as this accounts for the
|
||||
/// databased beatmap set's checksum, to disallow from playing with an altered version of the beatmap.
|
||||
/// </summary>
|
||||
public class MultiplayerBeatmapTracker : DownloadTrackingComposite<BeatmapSetInfo, BeatmapManager>
|
||||
public class MultiplayerBeatmapAvailablilityTracker : DownloadTrackingComposite<BeatmapSetInfo, BeatmapManager>
|
||||
{
|
||||
public readonly IBindable<PlaylistItem> SelectedItem = new Bindable<PlaylistItem>();
|
||||
|
||||
@ -26,11 +26,10 @@ namespace osu.Game.Online.Rooms
|
||||
|
||||
private readonly Bindable<BeatmapAvailability> availability = new Bindable<BeatmapAvailability>();
|
||||
|
||||
public MultiplayerBeatmapTracker()
|
||||
public MultiplayerBeatmapAvailablilityTracker()
|
||||
{
|
||||
State.BindValueChanged(_ => updateAvailability());
|
||||
Progress.BindValueChanged(_ => updateAvailability());
|
||||
updateAvailability();
|
||||
Progress.BindValueChanged(_ => updateAvailability(), true);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
@ -41,11 +41,11 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
private IBindable<WeakReference<BeatmapSetInfo>> managerUpdated;
|
||||
|
||||
[Cached]
|
||||
protected readonly MultiplayerBeatmapTracker BeatmapTracker;
|
||||
protected readonly MultiplayerBeatmapAvailablilityTracker BeatmapAvailablilityTracker;
|
||||
|
||||
protected RoomSubScreen()
|
||||
{
|
||||
InternalChild = BeatmapTracker = new MultiplayerBeatmapTracker
|
||||
InternalChild = BeatmapAvailablilityTracker = new MultiplayerBeatmapAvailablilityTracker
|
||||
{
|
||||
SelectedItem = { BindTarget = SelectedItem },
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user