mirror of https://github.com/ppy/osu
Use provided extension method instead of reimplementing locally
This commit is contained in:
parent
83bae81095
commit
436dec68c9
|
@ -8,7 +8,6 @@
|
|||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
|
@ -103,23 +102,7 @@ Player createPlayer()
|
|||
|
||||
if (replayGeneratingMod != null)
|
||||
{
|
||||
return new ReplayPlayer((beatmap, mods) =>
|
||||
{
|
||||
var replayData = replayGeneratingMod.CreateReplayData(beatmap, mods);
|
||||
|
||||
return new Score
|
||||
{
|
||||
Replay = replayData.Replay,
|
||||
ScoreInfo =
|
||||
{
|
||||
User = new APIUser
|
||||
{
|
||||
Id = APIUser.SYSTEM_USER_ID,
|
||||
Username = replayData.User.Username,
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
return new ReplayPlayer((beatmap, mods) => replayGeneratingMod.CreateScoreFromReplayData(beatmap, mods));
|
||||
}
|
||||
|
||||
return new SoloPlayer();
|
||||
|
|
Loading…
Reference in New Issue