mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Make "skin.ini" the default skin filename and remove redundant parameters
This commit is contained in:
parent
7a1909bf97
commit
078288a616
@ -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, null, storage, "skin.ini")
|
||||
: base(skin, null, storage)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ namespace osu.Game.Tests.Gameplay
|
||||
private class TestSkin : LegacySkin
|
||||
{
|
||||
public TestSkin(string resourceName, IStorageResourceProvider resources)
|
||||
: base(DefaultLegacySkin.CreateInfo(), resources, new TestResourceStore(resourceName), "skin.ini")
|
||||
: base(DefaultLegacySkin.CreateInfo(), resources, new TestResourceStore(resourceName))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -32,8 +32,7 @@ namespace osu.Game.Skinning
|
||||
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,
|
||||
"skin.ini"
|
||||
skin.Protected ? new NamespacedResourceStore<byte[]>(resources.Resources, "Skins/Legacy") : null
|
||||
)
|
||||
{
|
||||
Configuration.CustomColours["SliderBall"] = new Color4(2, 170, 255, 255);
|
||||
|
@ -46,7 +46,7 @@ namespace osu.Game.Skinning
|
||||
|
||||
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
|
||||
public LegacySkin(SkinInfo skin, IStorageResourceProvider resources)
|
||||
: this(skin, resources, null, "skin.ini")
|
||||
: this(skin, resources, null)
|
||||
{
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ namespace osu.Game.Skinning
|
||||
/// <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] IStorageResourceProvider resources, [CanBeNull] IResourceStore<byte[]> storage, string configurationFilename)
|
||||
protected LegacySkin(SkinInfo skin, [CanBeNull] IStorageResourceProvider resources, [CanBeNull] 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.
|
||||
|
@ -59,7 +59,7 @@ namespace osu.Game.Skinning
|
||||
/// <param name="resources">Access to game-wide 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">An optional filename to read the skin configuration from. If not provided, the configuration will be retrieved from the storage using "skin.ini".</param>
|
||||
protected Skin(SkinInfo skin, [CanBeNull] IStorageResourceProvider resources, [CanBeNull] IResourceStore<byte[]> storage = null, [CanBeNull] string configurationFilename = "skin.ini")
|
||||
protected Skin(SkinInfo skin, [CanBeNull] IStorageResourceProvider resources, [CanBeNull] IResourceStore<byte[]> storage = null, [CanBeNull] string configurationFilename = @"skin.ini")
|
||||
{
|
||||
if (resources != null)
|
||||
{
|
||||
|
@ -7,7 +7,6 @@ using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.IO.Stores;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Skinning;
|
||||
@ -141,7 +140,7 @@ namespace osu.Game.Tests.Beatmaps
|
||||
public static readonly Color4 HYPER_DASH_FRUIT_COLOUR = Color4.LightCyan;
|
||||
|
||||
public TestSkin(bool hasCustomColours)
|
||||
: base(new SkinInfo(), null, new ResourceStore<byte[]>(), string.Empty)
|
||||
: base(new SkinInfo(), null, null)
|
||||
{
|
||||
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, resources, storage, "skin.ini")
|
||||
: base(skin, resources, storage)
|
||||
{
|
||||
this.extrapolateAnimations = extrapolateAnimations;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user