1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:59:35 +08:00

Merge pull request #5554 from smoogipoo/workingbeatmap-beatmap-mods

Move IApplicableToBeatmap application to WorkingBeatmap
This commit is contained in:
Dean Herbert 2019-08-01 13:31:18 +08:00 committed by GitHub
commit b3044ed18d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 15 deletions

View File

@ -141,6 +141,9 @@ namespace osu.Game.Beatmaps
processor?.PostProcess();
foreach (var mod in mods.OfType<IApplicableToBeatmap>())
mod.ApplyToBeatmap(converted);
return converted;
}

View File

@ -109,8 +109,6 @@ namespace osu.Game.Rulesets.UI
Beatmap = (Beatmap<TObject>)workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo, mods);
applyBeatmapMods(mods);
KeyBindingInputManager = CreateInputManager();
playfield = new Lazy<Playfield>(CreatePlayfield);
@ -269,19 +267,6 @@ namespace osu.Game.Rulesets.UI
public override ScoreProcessor CreateScoreProcessor() => new ScoreProcessor<TObject>(this);
/// <summary>
/// Applies the active mods to the Beatmap.
/// </summary>
/// <param name="mods"></param>
private void applyBeatmapMods(IReadOnlyList<Mod> mods)
{
if (mods == null)
return;
foreach (var mod in mods.OfType<IApplicableToBeatmap>())
mod.ApplyToBeatmap(Beatmap);
}
/// <summary>
/// Applies the active mods to this DrawableRuleset.
/// </summary>