mirror of https://github.com/ppy/osu
Add virtual method to instantiate legacy replays.
This commit is contained in:
parent
b225ae82be
commit
136665e52e
|
@ -101,7 +101,7 @@ public Score ReadReplayFile(string replayFilename)
|
|||
|
||||
using (var lzma = new LzmaStream(properties, replayInStream, compressedSize, outSize))
|
||||
using (var reader = new StreamReader(lzma))
|
||||
score.Replay = new LegacyReplay(reader);
|
||||
score.Replay = score.CreateLegacyReplayFrom(reader);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
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 @@ public class Score
|
|||
[JsonProperty(@"date")]
|
||||
public DateTime Date;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a legacy replay which is read from a stream.
|
||||
/// </summary>
|
||||
/// <param name="reader">The stream reader.</param>
|
||||
/// <returns>The replay.</returns>
|
||||
public virtual Replay CreateLegacyReplayFrom(StreamReader reader) => new LegacyReplay(reader);
|
||||
|
||||
// [JsonProperty(@"count50")] 0,
|
||||
//[JsonProperty(@"count100")] 0,
|
||||
//[JsonProperty(@"count300")] 100,
|
||||
|
|
Loading…
Reference in New Issue