diff --git a/Data/Bms.cs b/Data/Bms.cs index a359adb..17fc36b 100644 --- a/Data/Bms.cs +++ b/Data/Bms.cs @@ -2,7 +2,6 @@ using CustomAlbums.Utilities; using Il2CppAssets.Scripts.GameCore.Managers; using Il2CppAssets.Scripts.PeroTools.Commons; -using Il2CppFormulaBase; using Il2CppGameLogic; using Il2CppPeroPeroGames.GlobalDefines; @@ -331,6 +330,9 @@ public void InitNoteData() { NoteData = new Dictionary(); + // NOTE: PPG has officially gone mad. The new scene 12 does not appear in the scene list, so we can't really use the scene list anymore. + Span sceneSpan = stackalloc int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + foreach (var config in NoteDataMananger.instance.noteDatas) { // Ignore april fools variants (these are handled elsewhere) @@ -355,16 +357,14 @@ public void InitNoteData() if (anyScene) { scenes = new List(); - foreach (var scene in Singleton.instance.sceneInfo) + + foreach (var scene in sceneSpan) { // Special handling for collectibles in touhou scene - if (config.GetNoteType() is NoteType.Hp or NoteType.Music && scene.Value == 8) + if (config.GetNoteType() is NoteType.Hp or NoteType.Music && scene == 8) continue; - // Fix for 10+ scenes - var sceneSuffix = scene.Value.ToString().Length == 1 - ? $"0{scene.Value}" - : scene.Value.ToString(); + var sceneSuffix = scene.ToString().PadLeft(2, '0'); scenes.Add($"scene_{sceneSuffix}"); } } @@ -417,6 +417,7 @@ public JsonArray GetNoteData() var speedGround = speedAir; var objectId = 1; + for (var i = 0; i < Notes.Count; i++) { var note = Notes[i]; @@ -433,6 +434,7 @@ public JsonArray GetNoteData() pathway = 1; else if (channelType.HasFlag(ChannelType.Ground) || channelType.HasFlag(ChannelType.Event)) pathway = 0; + if (pathway == -1) continue; // ReSharper disable once SwitchStatementHandlesSomeKnownEnumValuesWithDefault @@ -474,6 +476,7 @@ public JsonArray GetNoteData() var speed = pathway == 1 ? speedAir : speedGround; var scene = Info["GENRE"]?.GetValue(); + if (!NoteData!.TryGetValue(GetNoteDataKey(bmsKey, pathway, speed, scene), out var configData)) continue; diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 2da9ef2..1da37f4 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -7,7 +7,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CustomAlbums")] -[assembly: AssemblyCopyright("Copyright © Muse Dash Modding Community 2024")] +[assembly: AssemblyCopyright("Copyright © Muse Dash Modding Community 2025")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -29,8 +29,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.1.3.0")] -[assembly: AssemblyFileVersion("4.1.3.0")] -[assembly: MelonInfo(typeof(CustomAlbums.Main), "CustomAlbums", "4.1.3", "Team Baller")] +[assembly: AssemblyVersion("4.1.4.0")] +[assembly: AssemblyFileVersion("4.1.4.0")] +[assembly: MelonInfo(typeof(CustomAlbums.Main), "CustomAlbums", "4.1.4", "Two Fellas")] [assembly: MelonGame("PeroPeroGames", "MuseDash")] [assembly: MelonColor(255, 0, 255, 150)]