1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:07:25 +08:00

Prefer namespace lookups first

This commit is contained in:
Dean Herbert 2018-07-10 15:23:47 +09:00 committed by GitHub
parent ba258b8a05
commit 14c3cc70b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,16 +46,17 @@ namespace osu.Game.Audio
{
get
{
if (!string.IsNullOrEmpty(Suffix))
if (!string.IsNullOrEmpty(Namespace))
{
if (!string.IsNullOrEmpty(Namespace))
if (!string.IsNullOrEmpty(Suffix))
yield return $"{Namespace}/{Bank}-{Name}{Suffix}";
yield return $"{Bank}-{Name}{Suffix}"; // Without namespace as a fallback even when we have a namespace
yield return $"{Namespace}/{Bank}-{Name}";
}
if (!string.IsNullOrEmpty(Namespace))
yield return $"{Namespace}/{Bank}-{Name}";
yield return $"{Bank}-{Name}"; // Without namespace as a fallback even when we have a namespace
// check non-namespace as a fallback even when we have a namespace
if (!string.IsNullOrEmpty(Suffix))
yield return $"{Bank}-{Name}{Suffix}";
yield return $"{Bank}-{Name}";
}
}