mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Only custom sample banks > 1 modify the filename
This commit is contained in:
parent
3a9a82c80c
commit
94f1b2eeb8
@ -12,6 +12,7 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Beatmaps.Formats;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Skinning;
|
||||
|
||||
namespace osu.Game.Tests.Beatmaps.Formats
|
||||
@ -222,11 +223,13 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
{
|
||||
var hitObjects = decoder.Decode(stream).HitObjects;
|
||||
|
||||
Assert.AreEqual(0, ((LegacyDecoder<Beatmap>.LegacySampleControlPoint)hitObjects[0].SampleControlPoint).CustomSampleBank);
|
||||
Assert.AreEqual(1, ((LegacyDecoder<Beatmap>.LegacySampleControlPoint)hitObjects[1].SampleControlPoint).CustomSampleBank);
|
||||
Assert.AreEqual(2, ((LegacyDecoder<Beatmap>.LegacySampleControlPoint)hitObjects[2].SampleControlPoint).CustomSampleBank);
|
||||
Assert.AreEqual(0, ((LegacyDecoder<Beatmap>.LegacySampleControlPoint)hitObjects[3].SampleControlPoint).CustomSampleBank);
|
||||
Assert.AreEqual("hitnormal", getTestableSampleInfo(hitObjects[0]).Name);
|
||||
Assert.AreEqual("hitnormal", getTestableSampleInfo(hitObjects[1]).Name);
|
||||
Assert.AreEqual("hitnormal2", getTestableSampleInfo(hitObjects[2]).Name);
|
||||
Assert.AreEqual("hitnormal", getTestableSampleInfo(hitObjects[3]).Name);
|
||||
}
|
||||
|
||||
SampleInfo getTestableSampleInfo(HitObject hitObject) => hitObject.SampleControlPoint.ApplyTo(new SampleInfo { Name = "hitnormal" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
{
|
||||
var baseInfo = base.ApplyTo(sampleInfo);
|
||||
|
||||
if (CustomSampleBank > 0)
|
||||
if (CustomSampleBank > 1)
|
||||
baseInfo.Name += CustomSampleBank;
|
||||
|
||||
return baseInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user