mirror of https://github.com/ppy/osu
Loop over lookup names on default-samples retrieval
This commit is contained in:
parent
66223b9954
commit
4ef991b973
|
@ -45,10 +45,9 @@ protected override void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||||
var ch = skin.GetSample(s);
|
var ch = skin.GetSample(s);
|
||||||
|
|
||||||
if (ch == null && allowFallback)
|
if (ch == null && allowFallback)
|
||||||
if (s is HitSampleInfo hsi)
|
foreach (var lookup in s.LookupNames)
|
||||||
ch = audio.Samples.Get(string.IsNullOrEmpty(hsi.Namespace)
|
if ((ch = audio.Samples.Get($"Gameplay/{lookup}")) != null)
|
||||||
? $"Gameplay/{hsi.Namespace}/{hsi.Bank}-{hsi.Name}"
|
break;
|
||||||
: $"Gameplay/{hsi.Bank}-{hsi.Name}");
|
|
||||||
|
|
||||||
if (ch != null)
|
if (ch != null)
|
||||||
ch.Volume.Value = s.Volume / 100.0;
|
ch.Volume.Value = s.Volume / 100.0;
|
||||||
|
|
Loading…
Reference in New Issue