Merge branch 'master' into catch-hyperdash-fruit-colouring

This commit is contained in:
Dean Herbert
2020-04-19 21:48:41 +09:00
committed by GitHub
57 changed files with 1359 additions and 128 deletions

View File

@ -8,6 +8,7 @@ using osu.Framework.Logging;
using osu.Game.Audio;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.IO;
using osu.Game.Rulesets.Objects.Legacy;
using osuTK.Graphics;
namespace osu.Game.Beatmaps.Formats
@ -169,15 +170,19 @@ namespace osu.Game.Beatmaps.Formats
{
var baseInfo = base.ApplyTo(hitSampleInfo);
if (string.IsNullOrEmpty(baseInfo.Suffix) && CustomSampleBank > 1)
baseInfo.Suffix = CustomSampleBank.ToString();
if (baseInfo is ConvertHitObjectParser.LegacyHitSampleInfo legacy
&& legacy.CustomSampleBank == 0)
{
legacy.CustomSampleBank = CustomSampleBank;
}
return baseInfo;
}
public override bool EquivalentTo(ControlPoint other) =>
base.EquivalentTo(other) && other is LegacySampleControlPoint otherTyped &&
CustomSampleBank == otherTyped.CustomSampleBank;
public override bool IsRedundant(ControlPoint existing)
=> base.IsRedundant(existing)
&& existing is LegacySampleControlPoint existingSample
&& CustomSampleBank == existingSample.CustomSampleBank;
}
}
}