1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 08:53:20 +08:00

Allow import of skins which don't have ini files

This commit is contained in:
Dean Herbert 2018-03-19 20:26:16 +09:00
parent 7272ba2f1b
commit b71c123214

View File

@ -26,10 +26,13 @@ namespace osu.Game.Skinning
samples = audioManager.GetSampleManager(storage);
textures = new TextureStore(new RawTextureLoaderStore(storage));
var decoder = new LegacySkinDecoder();
Stream stream = storage.GetStream("skin.ini");
using (StreamReader reader = new StreamReader(storage.GetStream("skin.ini")))
Configuration = decoder.Decode(reader);
if (stream != null)
using (StreamReader reader = new StreamReader(stream))
Configuration = new LegacySkinDecoder().Decode(reader);
else
Configuration = new SkinConfiguration();
}
public override Drawable GetDrawableComponent(string componentName)