mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:13:34 +08:00
Fix osu!mania legacy skin configurations not working when notes are not skinned
This commit is contained in:
parent
14936677fc
commit
88b9d3237a
@ -19,7 +19,7 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
public class LegacyBeatmapSkin : LegacySkin
|
||||
{
|
||||
protected override bool AllowManiaSkin => false;
|
||||
protected override bool AllowManiaConfigLookups => false;
|
||||
protected override bool UseCustomSampleBanks => true;
|
||||
|
||||
/// <summary>
|
||||
|
@ -29,13 +29,7 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
public class LegacySkin : Skin
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether texture for the keys exists.
|
||||
/// Used to determine if the mania ruleset is skinned.
|
||||
/// </summary>
|
||||
private readonly Lazy<bool> hasKeyTexture;
|
||||
|
||||
protected virtual bool AllowManiaSkin => hasKeyTexture.Value;
|
||||
protected virtual bool AllowManiaConfigLookups => true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this skin can use samples with a custom bank (custom sample set in stable terminology).
|
||||
@ -61,10 +55,6 @@ namespace osu.Game.Skinning
|
||||
protected LegacySkin(SkinInfo skin, IStorageResourceProvider? resources, IResourceStore<byte[]>? storage, string configurationFilename = @"skin.ini")
|
||||
: base(skin, resources, storage, configurationFilename)
|
||||
{
|
||||
// todo: this shouldn't really be duplicated here (from ManiaLegacySkinTransformer). we need to come up with a better solution.
|
||||
hasKeyTexture = new Lazy<bool>(() => this.GetAnimation(
|
||||
lookupForMania<string>(new LegacyManiaSkinConfigurationLookup(4, LegacyManiaSkinConfigurationLookups.KeyImage, 0))?.Value ?? "mania-key1", true,
|
||||
true) != null);
|
||||
}
|
||||
|
||||
protected override void ParseConfigurationStream(Stream stream)
|
||||
@ -114,7 +104,7 @@ namespace osu.Game.Skinning
|
||||
return SkinUtils.As<TValue>(getCustomColour(Configuration, customColour.Lookup.ToString() ?? string.Empty));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookup maniaLookup:
|
||||
if (!AllowManiaSkin)
|
||||
if (!AllowManiaConfigLookups)
|
||||
break;
|
||||
|
||||
var result = lookupForMania<TValue>(maniaLookup);
|
||||
|
Loading…
Reference in New Issue
Block a user