Loop over lookup names on default-samples retrieval

This commit is contained in:
iiSaLMaN 2019-08-27 19:42:17 +03:00
parent 66223b9954
commit 4ef991b973
1 changed files with 3 additions and 4 deletions

View File

@ -45,10 +45,9 @@ protected override void SkinChanged(ISkinSource skin, bool allowFallback)
var ch = skin.GetSample(s);
if (ch == null && allowFallback)
if (s is HitSampleInfo hsi)
ch = audio.Samples.Get(string.IsNullOrEmpty(hsi.Namespace)
? $"Gameplay/{hsi.Namespace}/{hsi.Bank}-{hsi.Name}"
: $"Gameplay/{hsi.Bank}-{hsi.Name}");
foreach (var lookup in s.LookupNames)
if ((ch = audio.Samples.Get($"Gameplay/{lookup}")) != null)
break;
if (ch != null)
ch.Volume.Value = s.Volume / 100.0;