mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Remove skin configuration stream logic as it is no longer required
This commit is contained in:
parent
9d3c6ade62
commit
d0ea1739b4
@ -58,19 +58,7 @@ namespace osu.Game.Skinning
|
||||
/// <param name="resources">Access to raw game resources.</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] IResourceStore<byte[]> storage, [CanBeNull] IStorageResourceProvider resources, string configurationFilename)
|
||||
: this(skin, storage, resources, string.IsNullOrEmpty(configurationFilename) ? null : storage?.GetStream(configurationFilename))
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Construct a new legacy skin instance.
|
||||
/// </summary>
|
||||
/// <param name="skin">The model for this skin.</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="resources">Access to raw game resources.</param>
|
||||
/// <param name="configurationStream">An optional stream containing the contents of a skin.ini file.</param>
|
||||
protected LegacySkin(SkinInfo skin, [CanBeNull] IResourceStore<byte[]> storage, [CanBeNull] IStorageResourceProvider resources, [CanBeNull] Stream configurationStream)
|
||||
: base(skin, resources, storage, configurationStream)
|
||||
: base(skin, resources, storage, configurationFilename)
|
||||
{
|
||||
// todo: this shouldn't really be duplicated here (from ManiaLegacySkinTransformer). we need to come up with a better solution.
|
||||
hasKeyTexture = new Lazy<bool>(() => this.GetAnimation(
|
||||
|
@ -58,8 +58,8 @@ namespace osu.Game.Skinning
|
||||
/// <param name="skin">The skin's metadata. Usually a live realm object.</param>
|
||||
/// <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="configurationStream">An optional stream which will be used to read the skin configuration. If null, 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] Stream configurationStream = null)
|
||||
/// <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")
|
||||
{
|
||||
if (resources != null)
|
||||
{
|
||||
@ -77,7 +77,7 @@ namespace osu.Game.Skinning
|
||||
Textures = new TextureStore(resources.CreateTextureLoaderStore(storage));
|
||||
}
|
||||
|
||||
configurationStream ??= storage?.GetStream(@"skin.ini");
|
||||
var configurationStream = storage?.GetStream(configurationFilename);
|
||||
|
||||
if (configurationStream != null)
|
||||
// stream will be closed after use by LineBufferedReader.
|
||||
|
Loading…
Reference in New Issue
Block a user