mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Disable the GetHashCode warning instead of using bindables
This commit is contained in:
parent
a81672f3dc
commit
fbe8de2757
@ -16,7 +16,6 @@ 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>
|
||||||
@ -30,12 +29,6 @@ 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>
|
||||||
@ -51,11 +44,7 @@ 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
|
public bool GenerateTicks { get; set; } = true;
|
||||||
{
|
|
||||||
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
|
||||||
@ -79,6 +68,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
&& SliderVelocity == other.SliderVelocity
|
&& SliderVelocity == other.SliderVelocity
|
||||||
&& GenerateTicks == other.GenerateTicks;
|
&& GenerateTicks == other.GenerateTicks;
|
||||||
|
|
||||||
|
// ReSharper disable once NonReadonlyMemberInGetHashCode
|
||||||
public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), SliderVelocity, GenerateTicks);
|
public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), SliderVelocity, GenerateTicks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user