mirror of
https://github.com/osukey/osukey.git
synced 2025-05-19 20:47:24 +09: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.Rulesets.Objects.Types;
|
||||||
using osu.Game.Beatmaps.Formats;
|
using osu.Game.Beatmaps.Formats;
|
||||||
using osu.Game.Beatmaps.Timing;
|
using osu.Game.Beatmaps.Timing;
|
||||||
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Beatmaps.Formats
|
namespace osu.Game.Tests.Beatmaps.Formats
|
||||||
@ -222,11 +223,13 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
{
|
{
|
||||||
var hitObjects = decoder.Decode(stream).HitObjects;
|
var hitObjects = decoder.Decode(stream).HitObjects;
|
||||||
|
|
||||||
Assert.AreEqual(0, ((LegacyDecoder<Beatmap>.LegacySampleControlPoint)hitObjects[0].SampleControlPoint).CustomSampleBank);
|
Assert.AreEqual("hitnormal", getTestableSampleInfo(hitObjects[0]).Name);
|
||||||
Assert.AreEqual(1, ((LegacyDecoder<Beatmap>.LegacySampleControlPoint)hitObjects[1].SampleControlPoint).CustomSampleBank);
|
Assert.AreEqual("hitnormal", getTestableSampleInfo(hitObjects[1]).Name);
|
||||||
Assert.AreEqual(2, ((LegacyDecoder<Beatmap>.LegacySampleControlPoint)hitObjects[2].SampleControlPoint).CustomSampleBank);
|
Assert.AreEqual("hitnormal2", getTestableSampleInfo(hitObjects[2]).Name);
|
||||||
Assert.AreEqual(0, ((LegacyDecoder<Beatmap>.LegacySampleControlPoint)hitObjects[3].SampleControlPoint).CustomSampleBank);
|
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);
|
var baseInfo = base.ApplyTo(sampleInfo);
|
||||||
|
|
||||||
if (CustomSampleBank > 0)
|
if (CustomSampleBank > 1)
|
||||||
baseInfo.Name += CustomSampleBank;
|
baseInfo.Name += CustomSampleBank;
|
||||||
|
|
||||||
return baseInfo;
|
return baseInfo;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user