1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:43:22 +08:00

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 @@ namespace osu.Game
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 @@ namespace osu.Game.Screens.Play
{
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)