mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 00:22:58 +08:00
Add IApplicableToBeatmapProcessor
mod interface
This commit is contained in:
parent
a1da9c5ee3
commit
e1b2c63e09
@ -133,6 +133,9 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
IBeatmapProcessor processor = rulesetInstance.CreateBeatmapProcessor(converted);
|
IBeatmapProcessor processor = rulesetInstance.CreateBeatmapProcessor(converted);
|
||||||
|
|
||||||
|
foreach (var mod in mods.OfType<IApplicableToBeatmapProcessor>())
|
||||||
|
mod.ApplyToBeatmapProcessor(processor);
|
||||||
|
|
||||||
processor?.PreProcess();
|
processor?.PreProcess();
|
||||||
|
|
||||||
// Compute default values for hitobjects, including creating nested hitobjects in-case they're needed
|
// Compute default values for hitobjects, including creating nested hitobjects in-case they're needed
|
||||||
|
18
osu.Game/Rulesets/Mods/IApplicableToBeatmapProcessor.cs
Normal file
18
osu.Game/Rulesets/Mods/IApplicableToBeatmapProcessor.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Mods
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interface for a <see cref="Mod"/> that applies changes to a <see cref="BeatmapProcessor"/>.
|
||||||
|
/// </summary>
|
||||||
|
public interface IApplicableToBeatmapProcessor : IApplicableMod
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Applies this <see cref="Mod"/> to a <see cref="BeatmapProcessor"/>.
|
||||||
|
/// </summary>
|
||||||
|
void ApplyToBeatmapProcessor(IBeatmapProcessor beatmapProcessor);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user