1
0
mirror of synced 2024-12-02 14:57:16 +01:00
TaikoSoundEditor/Data/MusicAttributes.cs
NotImplementedLife 1ff7354141 first commit
2023-07-17 11:20:00 +03:00

26 lines
588 B
C#

using System.Text.Json.Serialization;
namespace TaikoSoundEditor.Data
{
public class MusicAttributes
{
[JsonPropertyName("items")]
public List<MusicAttribute> Items { get; set; } = new List<MusicAttribute>();
public MusicAttribute GetByUniqueId(int id)
{
return Items.Find(x => x.UniqueId == id);
}
public int GetNewId()
{
return Items.Max(i => i.UniqueId) + 1;
}
public bool IsValidSongId(string id)
{
return !Items.Any(i => i.Id == id);
}
}
}