mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 15:43:18 +08:00
Don't include empty namespace in sample lookup
This commit is contained in:
parent
7f832e34c0
commit
189194ee8d
@ -34,11 +34,16 @@ namespace osu.Game.Audio
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int Volume;
|
public int Volume;
|
||||||
|
|
||||||
public virtual IEnumerable<string> LookupNames => new[]
|
public virtual IEnumerable<string> LookupNames
|
||||||
{
|
{
|
||||||
$"{Namespace}/{Bank}-{Name}",
|
get
|
||||||
$"{Bank}-{Name}" // Without namespace as a fallback
|
{
|
||||||
};
|
if (!string.IsNullOrEmpty(Namespace))
|
||||||
|
yield return $"{Namespace}/{Bank}-{Name}";
|
||||||
|
|
||||||
|
yield return $"{Bank}-{Name}"; // Without namespace as a fallback even when we have a namespace
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public SampleInfo Clone() => (SampleInfo)MemberwiseClone();
|
public SampleInfo Clone() => (SampleInfo)MemberwiseClone();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user