mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:47:52 +08:00
Add setter to legacy skin configuration access
This commit is contained in:
parent
0407d2248c
commit
08b8cedfdf
@ -26,7 +26,11 @@ namespace osu.Game.Skinning
|
|||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
protected IResourceStore<SampleChannel> Samples;
|
protected IResourceStore<SampleChannel> Samples;
|
||||||
|
|
||||||
protected new LegacySkinConfiguration Configuration => (LegacySkinConfiguration)base.Configuration;
|
protected new LegacySkinConfiguration Configuration
|
||||||
|
{
|
||||||
|
get => base.Configuration as LegacySkinConfiguration;
|
||||||
|
set => base.Configuration = value;
|
||||||
|
}
|
||||||
|
|
||||||
public LegacySkin(SkinInfo skin, IResourceStore<byte[]> storage, AudioManager audioManager)
|
public LegacySkin(SkinInfo skin, IResourceStore<byte[]> storage, AudioManager audioManager)
|
||||||
: this(skin, new LegacySkinResourceStore<SkinFileInfo>(skin, storage), audioManager, "skin.ini")
|
: this(skin, new LegacySkinResourceStore<SkinFileInfo>(skin, storage), audioManager, "skin.ini")
|
||||||
@ -41,10 +45,10 @@ namespace osu.Game.Skinning
|
|||||||
if (stream != null)
|
if (stream != null)
|
||||||
{
|
{
|
||||||
using (LineBufferedReader reader = new LineBufferedReader(stream))
|
using (LineBufferedReader reader = new LineBufferedReader(stream))
|
||||||
base.Configuration = new LegacySkinDecoder().Decode(reader);
|
Configuration = new LegacySkinDecoder().Decode(reader);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
base.Configuration = new LegacySkinConfiguration { LegacyVersion = LegacySkinConfiguration.LATEST_VERSION };
|
Configuration = new LegacySkinConfiguration { LegacyVersion = LegacySkinConfiguration.LATEST_VERSION };
|
||||||
|
|
||||||
if (storage != null)
|
if (storage != null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user