Get mods from score info

This commit is contained in:
David Zhao 2019-07-08 16:13:03 +09:00
parent 5853a877c2
commit 6a86f62d17
2 changed files with 3 additions and 3 deletions

View File

@ -285,7 +285,7 @@ public void PresentScore(ScoreInfo score)
Ruleset.Value = databasedScoreInfo.Ruleset;
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
menuScreen.Push(new ReplayPlayerLoader(databasedScore, databasedScoreInfo.Mods));
menuScreen.Push(new ReplayPlayerLoader(databasedScore));
}, $"watch {databasedScoreInfo}", bypassScreenAllowChecks: true);
}

View File

@ -13,10 +13,10 @@ public class ReplayPlayerLoader : PlayerLoader
{
private readonly Bindable<IReadOnlyList<Mod>> mods;
public ReplayPlayerLoader(Score score, IReadOnlyList<Mod> mods)
public ReplayPlayerLoader(Score score)
: base(() => new ReplayPlayer(score))
{
this.mods = new Bindable<IReadOnlyList<Mod>>(mods);
mods = new Bindable<IReadOnlyList<Mod>>(score.ScoreInfo.Mods);
}
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)