From dcb9d2903b6a6ad19ad772b0cc8992a16fac9b8d Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 24 Mar 2017 14:03:46 +0900 Subject: [PATCH] Add virtual method to instantiate legacy replays. --- osu.Game/Modes/Scoring/Score.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osu.Game/Modes/Scoring/Score.cs b/osu.Game/Modes/Scoring/Score.cs index fa74fba279..75c243278d 100644 --- a/osu.Game/Modes/Scoring/Score.cs +++ b/osu.Game/Modes/Scoring/Score.cs @@ -6,6 +6,7 @@ using Newtonsoft.Json; using osu.Game.Database; using osu.Game.Modes.Mods; using osu.Game.Users; +using System.IO; namespace osu.Game.Modes.Scoring { @@ -43,6 +44,13 @@ namespace osu.Game.Modes.Scoring [JsonProperty(@"date")] public DateTime Date; + /// + /// Creates a legacy replay which is read from a stream. + /// + /// The stream reader. + /// The replay. + public virtual Replay CreateLegacyReplayFrom(StreamReader reader) => new LegacyReplay(reader); + // [JsonProperty(@"count50")] 0, //[JsonProperty(@"count100")] 0, //[JsonProperty(@"count300")] 100,