mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:35:10 +08:00
Allow catch difficulty adjust to enable hard rock offsets
This commit is contained in:
parent
a0fd7f72ac
commit
ad60b9d5a0
@ -5,11 +5,12 @@ using System.Linq;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
using osu.Game.Rulesets.Catch.Beatmaps;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Catch.Mods
|
namespace osu.Game.Rulesets.Catch.Mods
|
||||||
{
|
{
|
||||||
public class CatchModDifficultyAdjust : ModDifficultyAdjust
|
public class CatchModDifficultyAdjust : ModDifficultyAdjust, IApplicableToBeatmapProcessor
|
||||||
{
|
{
|
||||||
[SettingSource("Circle Size", "Override a beatmap's set CS.", FIRST_SETTING_ORDER - 1)]
|
[SettingSource("Circle Size", "Override a beatmap's set CS.", FIRST_SETTING_ORDER - 1)]
|
||||||
public BindableNumber<float> CircleSize { get; } = new BindableFloatWithLimitExtension
|
public BindableNumber<float> CircleSize { get; } = new BindableFloatWithLimitExtension
|
||||||
@ -31,6 +32,9 @@ namespace osu.Game.Rulesets.Catch.Mods
|
|||||||
Value = 5,
|
Value = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[SettingSource("Spicy Patterns", "Adjust the patterns as if Hard Rock is enabled.")]
|
||||||
|
public BindableBool HardRockOffsets { get; } = new BindableBool();
|
||||||
|
|
||||||
protected override void ApplyLimits(bool extended)
|
protected override void ApplyLimits(bool extended)
|
||||||
{
|
{
|
||||||
base.ApplyLimits(extended);
|
base.ApplyLimits(extended);
|
||||||
@ -70,5 +74,11 @@ namespace osu.Game.Rulesets.Catch.Mods
|
|||||||
ApplySetting(CircleSize, cs => difficulty.CircleSize = cs);
|
ApplySetting(CircleSize, cs => difficulty.CircleSize = cs);
|
||||||
ApplySetting(ApproachRate, ar => difficulty.ApproachRate = ar);
|
ApplySetting(ApproachRate, ar => difficulty.ApproachRate = ar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ApplyToBeatmapProcessor(IBeatmapProcessor beatmapProcessor)
|
||||||
|
{
|
||||||
|
var catchProcessor = (CatchBeatmapProcessor)beatmapProcessor;
|
||||||
|
catchProcessor.HardRockOffsets = HardRockOffsets.Value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user