Use provided extension method instead of reimplementing locally

This commit is contained in:
Bartłomiej Dach 2022-03-30 22:03:51 +02:00
parent 83bae81095
commit 436dec68c9
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
1 changed files with 1 additions and 18 deletions

View File

@ -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();