Move leagcy resource store construction local to DefaultLegacySkin

This commit is contained in:
Dean Herbert
2021-05-31 18:58:40 +09:00
parent b16d10bd95
commit 65709ec7d7
5 changed files with 10 additions and 19 deletions

View File

@ -3,7 +3,6 @@
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.IO.Stores;
using osu.Game.Rulesets;
using osu.Game.Skinning;
@ -17,9 +16,9 @@ namespace osu.Game.Tests.Visual
protected override TestPlayer CreatePlayer(Ruleset ruleset) => new SkinProvidingPlayer(legacySkinSource);
[BackgroundDependencyLoader]
private void load(OsuGameBase game, SkinManager skins)
private void load(SkinManager skins)
{
var legacySkin = new DefaultLegacySkin(new NamespacedResourceStore<byte[]>(game.Resources, "Skins/Legacy"), skins);
var legacySkin = new DefaultLegacySkin(skins);
legacySkinSource = new SkinProvidingContainer(legacySkin);
}

View File

@ -40,12 +40,12 @@ namespace osu.Game.Tests.Visual
}
[BackgroundDependencyLoader]
private void load(AudioManager audio, SkinManager skinManager, OsuGameBase game)
private void load(AudioManager audio, SkinManager skinManager)
{
var dllStore = new DllResourceStore(DynamicCompilationOriginal.GetType().Assembly);
metricsSkin = new TestLegacySkin(new SkinInfo { Name = "metrics-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/metrics_skin"), this, true);
defaultSkin = new DefaultLegacySkin(new NamespacedResourceStore<byte[]>(game.Resources, "Skins/Legacy"), this);
defaultSkin = new DefaultLegacySkin(this);
specialSkin = new TestLegacySkin(new SkinInfo { Name = "special-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/special_skin"), this, true);
oldSkin = new TestLegacySkin(new SkinInfo { Name = "old-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/old_skin"), this, true);
}