mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Remove unnecessary time property
This commit is contained in:
parent
69fb984e71
commit
9aac98664c
@ -19,11 +19,10 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
public int CompareTo(ControlPoint other) => Time.CompareTo(other.Time);
|
||||
|
||||
/// <summary>
|
||||
/// Whether this control point results in a meaningful change when placed after another.
|
||||
/// Determines whether this <see cref="ControlPoint"/> results in a meaningful change when placed alongside another.
|
||||
/// </summary>
|
||||
/// <param name="existing">An existing control point to compare with.</param>
|
||||
/// <param name="time">The time this control point will be placed at if it is added.</param>
|
||||
/// <returns>Whether redundant.</returns>
|
||||
public abstract bool IsRedundant(ControlPoint existing, double time);
|
||||
/// <returns>Whether this <see cref="ControlPoint"/> is redundant when placed alongside <paramref name="existing"/>.</returns>
|
||||
public abstract bool IsRedundant(ControlPoint existing);
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
break;
|
||||
}
|
||||
|
||||
return newPoint.IsRedundant(existing, time);
|
||||
return newPoint.IsRedundant(existing);
|
||||
}
|
||||
|
||||
private void groupItemAdded(ControlPoint controlPoint)
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
set => SpeedMultiplierBindable.Value = value;
|
||||
}
|
||||
|
||||
public override bool IsRedundant(ControlPoint existing, double time)
|
||||
public override bool IsRedundant(ControlPoint existing)
|
||||
=> existing is DifficultyControlPoint existingDifficulty
|
||||
&& SpeedMultiplier == existingDifficulty.SpeedMultiplier;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
set => KiaiModeBindable.Value = value;
|
||||
}
|
||||
|
||||
public override bool IsRedundant(ControlPoint existing, double time)
|
||||
public override bool IsRedundant(ControlPoint existing)
|
||||
=> !OmitFirstBarLine
|
||||
&& existing is EffectControlPoint existingEffect
|
||||
&& KiaiMode == existingEffect.KiaiMode
|
||||
|
@ -68,7 +68,7 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
return newSampleInfo;
|
||||
}
|
||||
|
||||
public override bool IsRedundant(ControlPoint existing, double time)
|
||||
public override bool IsRedundant(ControlPoint existing)
|
||||
=> existing is SampleControlPoint existingSample
|
||||
&& SampleBank == existingSample.SampleBank
|
||||
&& SampleVolume == existingSample.SampleVolume;
|
||||
|
@ -49,6 +49,6 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
public double BPM => 60000 / BeatLength;
|
||||
|
||||
// Timing points are never redundant as they can change the time signature.
|
||||
public override bool IsRedundant(ControlPoint existing, double time) => false;
|
||||
public override bool IsRedundant(ControlPoint existing) => false;
|
||||
}
|
||||
}
|
||||
|
@ -174,8 +174,8 @@ namespace osu.Game.Beatmaps.Formats
|
||||
return baseInfo;
|
||||
}
|
||||
|
||||
public override bool IsRedundant(ControlPoint existing, double time)
|
||||
=> base.IsRedundant(existing, time)
|
||||
public override bool IsRedundant(ControlPoint existing)
|
||||
=> base.IsRedundant(existing)
|
||||
&& existing is LegacySampleControlPoint existingSample
|
||||
&& CustomSampleBank == existingSample.CustomSampleBank;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user