Add index constants for cross-class safety

This commit is contained in:
Dean Herbert
2020-02-13 14:07:37 +09:00
parent a8eb9ba45c
commit 53b62816f8
3 changed files with 10 additions and 6 deletions

View File

@ -28,7 +28,11 @@ namespace osu.Game.Rulesets.Mods
public override Type[] IncompatibleMods => new[] { typeof(ModEasy), typeof(ModHardRock) };
[SettingSource("HP Drain", "Override a beatmap's set HP.", 1)]
protected const int FIRST_SETTING_ORDER = 1;
protected const int LAST_SETTING_ORDER = 2;
[SettingSource("HP Drain", "Override a beatmap's set HP.", FIRST_SETTING_ORDER)]
public BindableNumber<float> DrainRate { get; } = new BindableFloat
{
Precision = 0.1f,
@ -38,7 +42,7 @@ namespace osu.Game.Rulesets.Mods
Value = 5,
};
[SettingSource("Accuracy", "Override a beatmap's set OD.", 2)]
[SettingSource("Accuracy", "Override a beatmap's set OD.", LAST_SETTING_ORDER)]
public BindableNumber<float> OverallDifficulty { get; } = new BindableFloat
{
Precision = 0.1f,