mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 05:22:54 +08:00
Change parameter order of LegacySkin
to put IStorageResourceProvider
first
The optional resource store should not be before the (basically) required resource provider.
This commit is contained in:
parent
d0ea1739b4
commit
7a1909bf97
@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
public TestLegacySkin(SkinInfo skin, IResourceStore<byte[]> storage)
|
||||
// Bypass LegacySkinResourceStore to avoid returning null for retrieving files due to bad skin info (SkinInfo.Files = null).
|
||||
: base(skin, storage, null, "skin.ini")
|
||||
: base(skin, null, storage, "skin.ini")
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
private class TestLegacySkin : LegacySkin
|
||||
{
|
||||
public TestLegacySkin(IResourceStore<byte[]> storage, string fileName)
|
||||
: base(new SkinInfo { Name = "Test Skin", Creator = "Craftplacer" }, storage, null, fileName)
|
||||
: base(new SkinInfo { Name = "Test Skin", Creator = "Craftplacer" }, null, storage, fileName)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ namespace osu.Game.Tests.Gameplay
|
||||
private class TestSkin : LegacySkin
|
||||
{
|
||||
public TestSkin(string resourceName, IStorageResourceProvider resources)
|
||||
: base(DefaultLegacySkin.CreateInfo(), new TestResourceStore(resourceName), resources, "skin.ini")
|
||||
: base(DefaultLegacySkin.CreateInfo(), resources, new TestResourceStore(resourceName), "skin.ini")
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -30,9 +30,9 @@ namespace osu.Game.Skinning
|
||||
public DefaultLegacySkin(SkinInfo skin, IStorageResourceProvider resources)
|
||||
: base(
|
||||
skin,
|
||||
resources,
|
||||
// In the case of the actual default legacy skin (ie. the fallback one, which a user hasn't applied any modifications to) we want to use the game provided resources.
|
||||
skin.Protected ? new NamespacedResourceStore<byte[]>(resources.Resources, "Skins/Legacy") : null,
|
||||
resources,
|
||||
"skin.ini"
|
||||
)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Skinning
|
||||
/// <param name="beatmapInfo">The model for this beatmap.</param>
|
||||
/// <param name="resources">Access to raw game resources.</param>
|
||||
public LegacyBeatmapSkin(BeatmapInfo beatmapInfo, [CanBeNull] IStorageResourceProvider resources)
|
||||
: base(createSkinInfo(beatmapInfo), createRealmBackedStore(beatmapInfo, resources), resources, beatmapInfo.Path)
|
||||
: base(createSkinInfo(beatmapInfo), resources, createRealmBackedStore(beatmapInfo, resources), beatmapInfo.Path)
|
||||
{
|
||||
// Disallow default colours fallback on beatmap skins to allow using parent skin combo colours. (via SkinProvidingContainer)
|
||||
Configuration.AllowDefaultComboColoursFallback = false;
|
||||
|
@ -46,7 +46,7 @@ namespace osu.Game.Skinning
|
||||
|
||||
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
|
||||
public LegacySkin(SkinInfo skin, IStorageResourceProvider resources)
|
||||
: this(skin, null, resources, "skin.ini")
|
||||
: this(skin, resources, null, "skin.ini")
|
||||
{
|
||||
}
|
||||
|
||||
@ -54,10 +54,10 @@ namespace osu.Game.Skinning
|
||||
/// Construct a new legacy skin instance.
|
||||
/// </summary>
|
||||
/// <param name="skin">The model for this skin.</param>
|
||||
/// <param name="storage">An optional store which will be used for looking up skin resources. If null, one will be created from realm <see cref="IHasRealmFiles"/> pattern.</param>
|
||||
/// <param name="resources">Access to raw game resources.</param>
|
||||
/// <param name="storage">An optional store which will be used for looking up skin resources. If null, one will be created from realm <see cref="IHasRealmFiles"/> pattern.</param>
|
||||
/// <param name="configurationFilename">The user-facing filename of the configuration file to be parsed. Can accept an .osu or skin.ini file.</param>
|
||||
protected LegacySkin(SkinInfo skin, [CanBeNull] IResourceStore<byte[]> storage, [CanBeNull] IStorageResourceProvider resources, string configurationFilename)
|
||||
protected LegacySkin(SkinInfo skin, [CanBeNull] IStorageResourceProvider resources, [CanBeNull] IResourceStore<byte[]> storage, string 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.
|
||||
|
@ -141,7 +141,7 @@ namespace osu.Game.Tests.Beatmaps
|
||||
public static readonly Color4 HYPER_DASH_FRUIT_COLOUR = Color4.LightCyan;
|
||||
|
||||
public TestSkin(bool hasCustomColours)
|
||||
: base(new SkinInfo(), new ResourceStore<byte[]>(), null, string.Empty)
|
||||
: base(new SkinInfo(), null, new ResourceStore<byte[]>(), string.Empty)
|
||||
{
|
||||
if (hasCustomColours)
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ namespace osu.Game.Tests.Visual
|
||||
private readonly bool extrapolateAnimations;
|
||||
|
||||
public TestLegacySkin(SkinInfo skin, IResourceStore<byte[]> storage, IStorageResourceProvider resources, bool extrapolateAnimations)
|
||||
: base(skin, storage, resources, "skin.ini")
|
||||
: base(skin, resources, storage, "skin.ini")
|
||||
{
|
||||
this.extrapolateAnimations = extrapolateAnimations;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user