Add FindProvider lookup function

This commit is contained in:
Dean Herbert
2021-05-31 17:04:38 +09:00
parent 1d30791ab0
commit 88ed95e012
5 changed files with 31 additions and 4 deletions

View File

@ -69,10 +69,10 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
private void sourceChanged()
{
isLegacySkin = new Lazy<bool>(() => Source.GetConfig<LegacySkinConfiguration.LegacySetting, decimal>(LegacySkinConfiguration.LegacySetting.Version) != null);
hasKeyTexture = new Lazy<bool>(() => Source.GetAnimation(
isLegacySkin = new Lazy<bool>(() => Source.FindProvider(s => s.GetConfig<LegacySkinConfiguration.LegacySetting, decimal>(LegacySkinConfiguration.LegacySetting.Version) != null) != null);
hasKeyTexture = new Lazy<bool>(() => Source.FindProvider(s => s.GetAnimation(
this.GetManiaSkinConfig<string>(LegacyManiaSkinConfigurationLookups.KeyImage, 0)?.Value
?? "mania-key1", true, true) != null);
?? "mania-key1", true, true) != null) != null);
}
public override Drawable GetDrawableComponent(ISkinComponent component)