mirror of https://github.com/ppy/osu
Move ruleset into ReplayPlayerLoader as well
This commit is contained in:
parent
e78e326f34
commit
fbd300e664
|
@ -282,7 +282,6 @@ public void PresentScore(ScoreInfo score)
|
|||
|
||||
performFromMainMenu(() =>
|
||||
{
|
||||
Ruleset.Value = databasedScoreInfo.Ruleset;
|
||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
||||
|
||||
menuScreen.Push(new ReplayPlayerLoader(databasedScore));
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
public class ReplayPlayerLoader : PlayerLoader
|
||||
{
|
||||
private readonly IReadOnlyList<Mod> mods;
|
||||
private readonly ScoreInfo scoreInfo;
|
||||
|
||||
public ReplayPlayerLoader(Score score)
|
||||
: base(() => new ReplayPlayer(score))
|
||||
{
|
||||
mods = score.ScoreInfo.Mods;
|
||||
scoreInfo = score.ScoreInfo;
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
|
@ -23,7 +21,8 @@ protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnl
|
|||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
|
||||
// Overwrite the global mods here for use in the mod hud.
|
||||
Mods.Value = mods;
|
||||
Mods.Value = scoreInfo.Mods;
|
||||
Ruleset.Value = scoreInfo.Ruleset;
|
||||
|
||||
return dependencies;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue