mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Turn GenerateTicks into a bindable to pass code quality tests
This commit is contained in:
@ -16,6 +16,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
public static readonly DifficultyControlPoint DEFAULT = new DifficultyControlPoint
|
public static readonly DifficultyControlPoint DEFAULT = new DifficultyControlPoint
|
||||||
{
|
{
|
||||||
SliderVelocityBindable = { Disabled = true },
|
SliderVelocityBindable = { Disabled = true },
|
||||||
|
GenerateTicksBindable = { Disabled = true },
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -29,6 +30,12 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
MaxValue = 10
|
MaxValue = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether or not slider ticks should be generated at this control point.
|
||||||
|
/// This exists for backwards compatibility with maps that abuse NaN slider velocity behavior on osu!stable (e.g. /b/2628991).
|
||||||
|
/// </summary>
|
||||||
|
public readonly BindableBool GenerateTicksBindable = new BindableBool(true);
|
||||||
|
|
||||||
public override Color4 GetRepresentingColour(OsuColour colours) => colours.Lime1;
|
public override Color4 GetRepresentingColour(OsuColour colours) => colours.Lime1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -44,7 +51,11 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
/// Whether or not slider ticks should be generated at this control point.
|
/// Whether or not slider ticks should be generated at this control point.
|
||||||
/// This exists for backwards compatibility with maps that abuse NaN slider velocity behavior on osu!stable (e.g. /b/2628991).
|
/// This exists for backwards compatibility with maps that abuse NaN slider velocity behavior on osu!stable (e.g. /b/2628991).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool GenerateTicks { get; set; } = true;
|
public bool GenerateTicks
|
||||||
|
{
|
||||||
|
get => GenerateTicksBindable.Value;
|
||||||
|
set => GenerateTicksBindable.Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
public override bool IsRedundant(ControlPoint? existing)
|
public override bool IsRedundant(ControlPoint? existing)
|
||||||
=> existing is DifficultyControlPoint existingDifficulty
|
=> existing is DifficultyControlPoint existingDifficulty
|
||||||
|
Reference in New Issue
Block a user