mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 06:52:53 +08:00
Merge pull request #24727 from peppy/fix-mania-skin-lookups-no-sprites
Fix osu!mania legacy skin configurations not working when notes are not skinned
This commit is contained in:
commit
e3a0a914e7
@ -19,7 +19,7 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
public class LegacyBeatmapSkin : LegacySkin
|
public class LegacyBeatmapSkin : LegacySkin
|
||||||
{
|
{
|
||||||
protected override bool AllowManiaSkin => false;
|
protected override bool AllowManiaConfigLookups => false;
|
||||||
protected override bool UseCustomSampleBanks => true;
|
protected override bool UseCustomSampleBanks => true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -30,13 +30,7 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
public class LegacySkin : Skin
|
public class LegacySkin : Skin
|
||||||
{
|
{
|
||||||
/// <summary>
|
protected virtual bool AllowManiaConfigLookups => true;
|
||||||
/// 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;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this skin can use samples with a custom bank (custom sample set in stable terminology).
|
/// Whether this skin can use samples with a custom bank (custom sample set in stable terminology).
|
||||||
@ -62,10 +56,6 @@ namespace osu.Game.Skinning
|
|||||||
protected LegacySkin(SkinInfo skin, IStorageResourceProvider? resources, IResourceStore<byte[]>? storage, string configurationFilename = @"skin.ini")
|
protected LegacySkin(SkinInfo skin, IStorageResourceProvider? resources, IResourceStore<byte[]>? storage, string configurationFilename = @"skin.ini")
|
||||||
: base(skin, resources, storage, configurationFilename)
|
: 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)
|
protected override void ParseConfigurationStream(Stream stream)
|
||||||
@ -115,7 +105,7 @@ namespace osu.Game.Skinning
|
|||||||
return SkinUtils.As<TValue>(getCustomColour(Configuration, customColour.Lookup.ToString() ?? string.Empty));
|
return SkinUtils.As<TValue>(getCustomColour(Configuration, customColour.Lookup.ToString() ?? string.Empty));
|
||||||
|
|
||||||
case LegacyManiaSkinConfigurationLookup maniaLookup:
|
case LegacyManiaSkinConfigurationLookup maniaLookup:
|
||||||
if (!AllowManiaSkin)
|
if (!AllowManiaConfigLookups)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
var result = lookupForMania<TValue>(maniaLookup);
|
var result = lookupForMania<TValue>(maniaLookup);
|
||||||
|
Loading…
Reference in New Issue
Block a user