mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:32:55 +08:00
Merge pull request #5554 from smoogipoo/workingbeatmap-beatmap-mods
Move IApplicableToBeatmap application to WorkingBeatmap
This commit is contained in:
commit
b3044ed18d
@ -141,6 +141,9 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
processor?.PostProcess();
|
processor?.PostProcess();
|
||||||
|
|
||||||
|
foreach (var mod in mods.OfType<IApplicableToBeatmap>())
|
||||||
|
mod.ApplyToBeatmap(converted);
|
||||||
|
|
||||||
return converted;
|
return converted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,8 +109,6 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
Beatmap = (Beatmap<TObject>)workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo, mods);
|
Beatmap = (Beatmap<TObject>)workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo, mods);
|
||||||
|
|
||||||
applyBeatmapMods(mods);
|
|
||||||
|
|
||||||
KeyBindingInputManager = CreateInputManager();
|
KeyBindingInputManager = CreateInputManager();
|
||||||
playfield = new Lazy<Playfield>(CreatePlayfield);
|
playfield = new Lazy<Playfield>(CreatePlayfield);
|
||||||
|
|
||||||
@ -269,19 +267,6 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
public override ScoreProcessor CreateScoreProcessor() => new ScoreProcessor<TObject>(this);
|
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>
|
/// <summary>
|
||||||
/// Applies the active mods to this DrawableRuleset.
|
/// Applies the active mods to this DrawableRuleset.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user