mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Fix formatting
This commit is contained in:
@ -28,10 +28,10 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this control point results in a meaningful change when placed after another.
|
/// Whether this control point results in a meaningful change when placed after another.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="other">Another control point to compare with.</param>
|
/// <param name="existing">An existing control point to compare with.</param>
|
||||||
/// <param name="time">The time this timing point will be placed at.</param>
|
/// <param name="time">The time this control point will be placed at if it is added.</param>
|
||||||
/// <returns>Whether redundant.</returns>
|
/// <returns>Whether redundant.</returns>
|
||||||
public abstract bool IsRedundant(ControlPoint other, double time);
|
public abstract bool IsRedundant(ControlPoint existing, double time);
|
||||||
|
|
||||||
public bool Equals(ControlPoint other) => Time == other?.Time && EquivalentTo(other);
|
public bool Equals(ControlPoint other) => Time == other?.Time && EquivalentTo(other);
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
|
|
||||||
public override bool EquivalentTo(ControlPoint other) =>
|
public override bool EquivalentTo(ControlPoint other) =>
|
||||||
other is DifficultyControlPoint otherTyped && otherTyped.SpeedMultiplier.Equals(SpeedMultiplier);
|
other is DifficultyControlPoint otherTyped && otherTyped.SpeedMultiplier.Equals(SpeedMultiplier);
|
||||||
public override bool IsRedundant(ControlPoint other, double time) => EquivalentTo(other);
|
|
||||||
|
public override bool IsRedundant(ControlPoint existing, double time) => EquivalentTo(existing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
public override bool EquivalentTo(ControlPoint other) =>
|
public override bool EquivalentTo(ControlPoint other) =>
|
||||||
other is EffectControlPoint otherTyped &&
|
other is EffectControlPoint otherTyped &&
|
||||||
KiaiMode == otherTyped.KiaiMode && OmitFirstBarLine == otherTyped.OmitFirstBarLine;
|
KiaiMode == otherTyped.KiaiMode && OmitFirstBarLine == otherTyped.OmitFirstBarLine;
|
||||||
public override bool IsRedundant(ControlPoint other, double time) => !OmitFirstBarLine && EquivalentTo(other);
|
|
||||||
|
public override bool IsRedundant(ControlPoint existing, double time) => !OmitFirstBarLine && EquivalentTo(existing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,6 +71,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
public override bool EquivalentTo(ControlPoint other) =>
|
public override bool EquivalentTo(ControlPoint other) =>
|
||||||
other is SampleControlPoint otherTyped &&
|
other is SampleControlPoint otherTyped &&
|
||||||
SampleBank == otherTyped.SampleBank && SampleVolume == otherTyped.SampleVolume;
|
SampleBank == otherTyped.SampleBank && SampleVolume == otherTyped.SampleVolume;
|
||||||
public override bool IsRedundant(ControlPoint other, double time) => EquivalentTo(other);
|
|
||||||
|
public override bool IsRedundant(ControlPoint existing, double time) => EquivalentTo(existing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,8 +52,8 @@ namespace osu.Game.Beatmaps.ControlPoints
|
|||||||
other is TimingControlPoint otherTyped
|
other is TimingControlPoint otherTyped
|
||||||
&& TimeSignature == otherTyped.TimeSignature && BeatLength.Equals(otherTyped.BeatLength);
|
&& TimeSignature == otherTyped.TimeSignature && BeatLength.Equals(otherTyped.BeatLength);
|
||||||
|
|
||||||
public override bool IsRedundant(ControlPoint other, double time) =>
|
public override bool IsRedundant(ControlPoint existing, double time) =>
|
||||||
EquivalentTo(other)
|
EquivalentTo(existing)
|
||||||
&& other.Time == time;
|
&& existing.Time == time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user