let retrievals outside mania skin components use extension

https://github.com/ppy/osu/pull/9264#discussion_r439730321
This commit is contained in:
mcendu 2020-06-13 23:07:04 +08:00
parent bd7b7b5017
commit ffae73a966
1 changed files with 3 additions and 5 deletions

View File

@ -71,8 +71,7 @@ private void sourceChanged()
{
isLegacySkin = new Lazy<bool>(() => source.GetConfig<LegacySkinConfiguration.LegacySetting, decimal>(LegacySkinConfiguration.LegacySetting.Version) != null);
hasKeyTexture = new Lazy<bool>(() => source.GetAnimation(
GetConfig<ManiaSkinConfigurationLookup, string>(
new ManiaSkinConfigurationLookup(LegacyManiaSkinConfigurationLookups.KeyImage, 0))?.Value
this.GetManiaSkinConfig<string>(LegacyManiaSkinConfigurationLookups.KeyImage)?.Value
?? "mania-key1", true, true) != null);
}
@ -128,9 +127,8 @@ public Drawable GetDrawableComponent(ISkinComponent component)
private Drawable getResult(HitResult result)
{
string filename = GetConfig<ManiaSkinConfigurationLookup, string>(
new ManiaSkinConfigurationLookup(hitresult_mapping[result])
)?.Value ?? default_hitresult_skin_filenames[result];
string filename = this.GetManiaSkinConfig<string>(hitresult_mapping[result])?.Value
?? default_hitresult_skin_filenames[result];
return this.GetAnimation(filename, true, true);
}