-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Bindables; | ||
using osu.Game.Beatmaps; | ||
using osu.Game.Configuration; | ||
using osu.Game.Rulesets.Mods; | ||
|
||
namespace osu.Game.Rulesets.Tau.Mods | ||
{ | ||
public class TauModDifficultyAdjust : ModDifficultyAdjust | ||
{ | ||
[SettingSource("Paddle Size", "Override a beatmap's set PS.")] | ||
public BindableNumber<float> PaddleSize { get; } = new BindableFloat | ||
{ | ||
Precision = 0.1f, | ||
MinValue = 1, | ||
MaxValue = 10, | ||
Default = 5, | ||
Value = 5, | ||
}; | ||
|
||
[SettingSource("Approach Rate", "Override a beatmap's set AR.")] | ||
public BindableNumber<float> ApproachRate { get; } = new BindableFloat | ||
{ | ||
Precision = 0.1f, | ||
MinValue = 1, | ||
MaxValue = 10, | ||
Default = 5, | ||
Value = 5, | ||
}; | ||
|
||
protected override void TransferSettings(BeatmapDifficulty difficulty) | ||
{ | ||
base.TransferSettings(difficulty); | ||
|
||
TransferSetting(PaddleSize, difficulty.CircleSize); | ||
TransferSetting(ApproachRate, difficulty.ApproachRate); | ||
} | ||
|
||
protected override void ApplySettings(BeatmapDifficulty difficulty) | ||
{ | ||
base.ApplySettings(difficulty); | ||
|
||
difficulty.CircleSize = PaddleSize.Value; | ||
difficulty.ApproachRate = ApproachRate.Value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters