mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Merge branch 'master' into beatmap-update-online-flow
This commit is contained in:
@ -402,16 +402,18 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
[Test]
|
||||
public void TestPlayStartsWithCorrectBeatmapWhileAtSongSelect()
|
||||
{
|
||||
createRoom(() => new Room
|
||||
PlaylistItem? item = null;
|
||||
createRoom(() =>
|
||||
{
|
||||
Name = { Value = "Test Room" },
|
||||
Playlist =
|
||||
item = new PlaylistItem(beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo)
|
||||
{
|
||||
new PlaylistItem(beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo)
|
||||
{
|
||||
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||
}
|
||||
}
|
||||
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||
};
|
||||
return new Room
|
||||
{
|
||||
Name = { Value = "Test Room" },
|
||||
Playlist = { item }
|
||||
};
|
||||
});
|
||||
|
||||
pressReadyButton();
|
||||
@ -419,7 +421,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddStep("Enter song select", () =>
|
||||
{
|
||||
var currentSubScreen = ((Screens.OnlinePlay.Multiplayer.Multiplayer)multiplayerComponents.CurrentScreen).CurrentSubScreen;
|
||||
((MultiplayerMatchSubScreen)currentSubScreen).OpenSongSelection(multiplayerClient.ClientRoom?.Settings.PlaylistItemId);
|
||||
((MultiplayerMatchSubScreen)currentSubScreen).OpenSongSelection(item);
|
||||
});
|
||||
|
||||
AddUntilStep("wait for song select", () => this.ChildrenOfType<MultiplayerMatchSongSelect>().FirstOrDefault()?.BeatmapSetsLoaded == true);
|
||||
@ -440,16 +442,18 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
[Test]
|
||||
public void TestPlayStartsWithCorrectRulesetWhileAtSongSelect()
|
||||
{
|
||||
createRoom(() => new Room
|
||||
PlaylistItem? item = null;
|
||||
createRoom(() =>
|
||||
{
|
||||
Name = { Value = "Test Room" },
|
||||
Playlist =
|
||||
item = new PlaylistItem(beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo)
|
||||
{
|
||||
new PlaylistItem(beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo)
|
||||
{
|
||||
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||
}
|
||||
}
|
||||
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||
};
|
||||
return new Room
|
||||
{
|
||||
Name = { Value = "Test Room" },
|
||||
Playlist = { item }
|
||||
};
|
||||
});
|
||||
|
||||
pressReadyButton();
|
||||
@ -457,7 +461,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddStep("Enter song select", () =>
|
||||
{
|
||||
var currentSubScreen = ((Screens.OnlinePlay.Multiplayer.Multiplayer)multiplayerComponents.CurrentScreen).CurrentSubScreen;
|
||||
((MultiplayerMatchSubScreen)currentSubScreen).OpenSongSelection(multiplayerClient.ClientRoom?.Settings.PlaylistItemId);
|
||||
((MultiplayerMatchSubScreen)currentSubScreen).OpenSongSelection(item);
|
||||
});
|
||||
|
||||
AddUntilStep("wait for song select", () => this.ChildrenOfType<MultiplayerMatchSongSelect>().FirstOrDefault()?.BeatmapSetsLoaded == true);
|
||||
@ -478,16 +482,18 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
[Test]
|
||||
public void TestPlayStartsWithCorrectModsWhileAtSongSelect()
|
||||
{
|
||||
createRoom(() => new Room
|
||||
PlaylistItem? item = null;
|
||||
createRoom(() =>
|
||||
{
|
||||
Name = { Value = "Test Room" },
|
||||
Playlist =
|
||||
item = new PlaylistItem(beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo)
|
||||
{
|
||||
new PlaylistItem(beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo)
|
||||
{
|
||||
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||
}
|
||||
}
|
||||
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||
};
|
||||
return new Room
|
||||
{
|
||||
Name = { Value = "Test Room" },
|
||||
Playlist = { item }
|
||||
};
|
||||
});
|
||||
|
||||
pressReadyButton();
|
||||
@ -495,7 +501,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddStep("Enter song select", () =>
|
||||
{
|
||||
var currentSubScreen = ((Screens.OnlinePlay.Multiplayer.Multiplayer)multiplayerComponents.CurrentScreen).CurrentSubScreen;
|
||||
((MultiplayerMatchSubScreen)currentSubScreen).OpenSongSelection(multiplayerClient.ClientRoom?.Settings.PlaylistItemId);
|
||||
((MultiplayerMatchSubScreen)currentSubScreen).OpenSongSelection(item);
|
||||
});
|
||||
|
||||
AddUntilStep("wait for song select", () => this.ChildrenOfType<MultiplayerMatchSongSelect>().FirstOrDefault()?.BeatmapSetsLoaded == true);
|
||||
|
@ -255,18 +255,25 @@ namespace osu.Game.Tests.Visual.Online
|
||||
};
|
||||
|
||||
const int initial_great_count = 2000;
|
||||
const int initial_tick_count = 100;
|
||||
|
||||
int greatCount = initial_great_count;
|
||||
int tickCount = initial_tick_count;
|
||||
|
||||
foreach (var s in scores.Scores)
|
||||
{
|
||||
s.Statistics = new Dictionary<HitResult, int>
|
||||
{
|
||||
{ HitResult.Great, greatCount -= 100 },
|
||||
{ HitResult.Great, greatCount },
|
||||
{ HitResult.LargeTickHit, tickCount },
|
||||
{ HitResult.Ok, RNG.Next(100) },
|
||||
{ HitResult.Meh, RNG.Next(100) },
|
||||
{ HitResult.Miss, initial_great_count - greatCount }
|
||||
{ HitResult.Miss, initial_great_count - greatCount },
|
||||
{ HitResult.LargeTickMiss, initial_tick_count - tickCount },
|
||||
};
|
||||
|
||||
greatCount -= 100;
|
||||
tickCount -= RNG.Next(1, 5);
|
||||
}
|
||||
|
||||
return scores;
|
||||
|
Reference in New Issue
Block a user