mirror of https://github.com/ppy/osu
Add setter to legacy skin configuration access
This commit is contained in:
parent
0407d2248c
commit
08b8cedfdf
|
@ -26,7 +26,11 @@ public class LegacySkin : Skin
|
||||||
[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 @@ protected LegacySkin(SkinInfo skin, IResourceStore<byte[]> storage, AudioManager
|
||||||
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