Skip to content

Commit

Permalink
Remove toe group from the beatmap skin.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Apr 29, 2023
1 parent 77ea048 commit 7b96f38
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions osu.Game.Rulesets.Karaoke/Skinning/KaraokeBeatmapSkin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
using osu.Game.Rulesets.Karaoke.IO.Serialization;
using osu.Game.Rulesets.Karaoke.Objects;
using osu.Game.Rulesets.Karaoke.Skinning.Elements;
using osu.Game.Rulesets.Karaoke.Skinning.Groups;
using osu.Game.Skinning;

namespace osu.Game.Rulesets.Karaoke.Skinning
Expand All @@ -24,7 +23,6 @@ namespace osu.Game.Rulesets.Karaoke.Skinning
public class KaraokeBeatmapSkin : KaraokeSkin
{
public readonly IDictionary<ElementType, IList<IKaraokeSkinElement>> Elements = new Dictionary<ElementType, IList<IKaraokeSkinElement>>();
public readonly List<IGroup> Groups = new();

public KaraokeBeatmapSkin(SkinInfo skin, IStorageResourceProvider? resources, IResourceStore<byte[]>? storage = null)
: base(skin, resources, storage)
Expand Down Expand Up @@ -69,30 +67,6 @@ static string getFileNameByType(ElementType elementType)
_ => throw new InvalidEnumArgumentException(nameof(elementType))
};
});

SkinInfo.PerformRead(s =>
{
const string filename = "groups.json";

try
{
string? jsonContent = GetElementStringContentFromSkinInfo(s, filename);
if (string.IsNullOrEmpty(jsonContent))
return;

var globalSetting = SkinJsonSerializableExtensions.CreateSkinGroupGlobalSettings();
var deserializedContent = JsonConvert.DeserializeObject<IGroup[]>(jsonContent, globalSetting);

if (deserializedContent == null)
return;

Groups.AddRange(deserializedContent);
}
catch (Exception ex)
{
Logger.Error(ex, "Failed to load skin element.");
}
});
}

public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup)
Expand Down

0 comments on commit 7b96f38

Please sign in to comment.