Revert changes done to SkinConfiguration and IHasCustomColours

This commit is contained in:
Craftplacer 2020-08-31 17:23:42 +02:00
parent 07f6a68179
commit eafa97af17
3 changed files with 4 additions and 8 deletions

View File

@ -8,6 +8,6 @@ namespace osu.Game.Beatmaps.Formats
{ {
public interface IHasCustomColours public interface IHasCustomColours
{ {
IDictionary<string, Color4> CustomColours { get; } Dictionary<string, Color4> CustomColours { get; }
} }
} }

View File

@ -23,7 +23,7 @@ public class LegacyManiaSkinConfiguration : IHasCustomColours
public readonly int Keys; public readonly int Keys;
public IDictionary<string, Color4> CustomColours { get; } = new SortedDictionary<string, Color4>(); public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>();
public Dictionary<string, string> ImageLookups = new Dictionary<string, string>(); public Dictionary<string, string> ImageLookups = new Dictionary<string, string>();

View File

@ -1,9 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Formats;
using osuTK.Graphics; using osuTK.Graphics;
@ -12,7 +10,7 @@ namespace osu.Game.Skinning
/// <summary> /// <summary>
/// An empty skin configuration. /// An empty skin configuration.
/// </summary> /// </summary>
public class SkinConfiguration : IEquatable<SkinConfiguration>, IHasComboColours, IHasCustomColours public class SkinConfiguration : IHasComboColours, IHasCustomColours
{ {
public readonly SkinInfo SkinInfo = new SkinInfo(); public readonly SkinInfo SkinInfo = new SkinInfo();
@ -47,10 +45,8 @@ public IReadOnlyList<Color4> ComboColours
public void AddComboColours(params Color4[] colours) => comboColours.AddRange(colours); public void AddComboColours(params Color4[] colours) => comboColours.AddRange(colours);
public IDictionary<string, Color4> CustomColours { get; } = new SortedDictionary<string, Color4>(); public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>();
public readonly SortedDictionary<string, string> ConfigDictionary = new SortedDictionary<string, string>(); public readonly SortedDictionary<string, string> ConfigDictionary = new SortedDictionary<string, string>();
public bool Equals(SkinConfiguration other) => other != null && ConfigDictionary.SequenceEqual(other.ConfigDictionary) && ((ComboColours == null && other.ComboColours == null) || ComboColours.SequenceEqual(other.ComboColours)) && CustomColours.SequenceEqual(other.CustomColours);
} }
} }