Forcefully regenerate autoplay on editor changes

This commit is contained in:
Dean Herbert
2020-09-28 14:15:54 +09:00
parent ff7c904996
commit 524c2b678c
2 changed files with 20 additions and 2 deletions

View File

@ -151,8 +151,11 @@ namespace osu.Game.Rulesets.UI
public virtual PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new PlayfieldAdjustmentContainer();
[Resolved]
private OsuConfigManager config { get; set; }
[BackgroundDependencyLoader]
private void load(OsuConfigManager config, CancellationToken? cancellationToken)
private void load(CancellationToken? cancellationToken)
{
InternalChildren = new Drawable[]
{
@ -178,11 +181,18 @@ namespace osu.Game.Rulesets.UI
.WithChild(ResumeOverlay)));
}
applyRulesetMods(Mods, config);
RegenerateAutoplay();
loadObjects(cancellationToken);
}
public void RegenerateAutoplay()
{
// for now this is applying mods which aren't just autoplay.
// we'll need to reconsider this flow in the future.
applyRulesetMods(Mods, config);
}
/// <summary>
/// Creates and adds drawable representations of hit objects to the play field.
/// </summary>