1
0
mirror of synced 2024-11-24 04:20:10 +01:00
This commit is contained in:
NotImplementedLife 2023-07-17 13:35:25 +03:00
parent c2e0f761d7
commit ff3c80a572
2 changed files with 16 additions and 5 deletions

View File

@ -350,15 +350,26 @@ namespace TaikoSoundEditor
{
var mi = new MusicInfos();
mi.Items.AddRange(MusicInfos.Items);
mi.Items.AddRange(AddedMusic.Select(_ => _.MusicInfo));
var ma = new MusicAttributes();
ma.Items.AddRange(MusicAttributes.Items);
ma.Items.AddRange(AddedMusic.Select(_ => _.MusicAttribute));
var mo = new MusicOrders();
mo.Items.AddRange(MusicOrders.Items);
mo.Items.AddRange(AddedMusic.Select(_ => _.MusicOrder));
var mbyg = MusicOrders.Items.GroupBy(_ => _.GenreNo).Select(_ => (_.Key, List: _.ToList())).ToDictionary(_ => _.Key, _ => _.List);
foreach (var m in AddedMusic.Select(_ => _.MusicOrder))
{
if (!mbyg.ContainsKey(m.GenreNo))
mbyg[m.GenreNo] = new List<MusicOrder>();
mbyg[m.GenreNo] = mbyg[m.GenreNo].Prepend(m).ToList();
}
foreach(var key in mbyg.Keys.OrderBy(_=>_))
{
mo.Items.AddRange(mbyg[key]);
}
var wl = new WordList();
wl.Items.AddRange(WordList.Items);

2
TJA.cs
View File

@ -278,7 +278,7 @@ namespace TaikoSoundEditor
if (parsed.Name == "TITLEJA")
headers.TitleJa = parsed.Value;
if (parsed.Name == "SUBTITLE")
headers.Subtitle = parsed.Value;
headers.Subtitle = parsed.Value.StartsWith("--") ? parsed.Value.Substring(2) : parsed.Value;
if (parsed.Name == "BPM")
headers.Bpm = float.Parse(parsed.Value);
if (parsed.Name == "WAVE")