mirror of https://github.com/ppy/osu
Don't include empty namespace in sample lookup
This commit is contained in:
parent
7f832e34c0
commit
189194ee8d
|
@ -34,11 +34,16 @@ public class SampleInfo
|
|||
/// </summary>
|
||||
public int Volume;
|
||||
|
||||
public virtual IEnumerable<string> LookupNames => new[]
|
||||
public virtual IEnumerable<string> LookupNames
|
||||
{
|
||||
$"{Namespace}/{Bank}-{Name}",
|
||||
$"{Bank}-{Name}" // Without namespace as a fallback
|
||||
};
|
||||
get
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue