Make SampleInfo choose its own lookup name

This commit is contained in:
smoogipoo
2018-07-02 14:18:41 +09:00
parent 8b0c6a4c85
commit 310c4a7d6c
2 changed files with 15 additions and 10 deletions

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
namespace osu.Game.Audio
{
@ -33,6 +34,12 @@ namespace osu.Game.Audio
/// </summary>
public int Volume;
public virtual IEnumerable<string> LookupNames => new[]
{
$"{Namespace}/{Bank}-{Name}",
$"{Bank}-{Name}" // Without namespace as a fallback
};
public SampleInfo Clone() => (SampleInfo)MemberwiseClone();
}
}