From 00c81f73def2f55805f918f8fa4030784def88b2 Mon Sep 17 00:00:00 2001 From: ALLMarvelous <53633401+ALLMarvelous@users.noreply.github.com> Date: Sun, 4 May 2025 02:31:37 -0500 Subject: [PATCH 01/10] Re-format and properly sort Directory.Build.props --- Directory.Build.props | 353 ++++++++++++++++++++++-------------------- 1 file changed, 184 insertions(+), 169 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 1561873..e46c1c8 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,172 +1,187 @@ - - false - False - $(MD_NET6_DIRECTORY) - $(MD_DIRECTORY) - $(GameFolder)\MelonLoader\ - $(MelonLoader)\net6\ - $(MelonLoader)\Il2CppAssemblies\ - - - - false - false - $(MelonAssemblies)\Assembly-CSharp.dll - - - false - false - $(MelonAssemblies)\Assembly-CSharp-firstpass.dll - - - false - false - $(MelonAssemblies)\Il2CppPeroString.dll - - - false - false - $(MelonAssemblies)\Il2Cppcom.prpr.log.dll - - - false - false - $(MelonAssemblies)\Il2CppGoogle.Protobuf.dll - - - false - false - $(MelonAssemblies)\Il2Cppmscorlib.dll - - - false - false - $(MelonAssemblies)\Il2CppNewtonsoft.Json.dll - - - false - false - $(MelonAssemblies)\Il2CppSystem.dll - - - false - false - $(MelonAssemblies)\Il2CppSystem.Core.dll - - - false - false - $(MelonNET6)\MelonLoader.dll - - - false - false - $(MelonNET6)\Il2CppInterop.Common.dll - - - false - false - $(MelonNET6)\Il2CppInterop.Generator.dll - - - false - false - $(MelonNET6)\Il2CppInterop.Runtime.dll - - - false - false - $(MelonNET6)\0Harmony.dll - - - false - false - $(MelonAssemblies)\Il2CppNAudio.dll - - - false - false - $(MelonAssemblies)\Il2CppPeroTools2.dll - - - false - false - $(MelonAssemblies)\Il2CppPeroTools2.Resources.dll - - - false - false - $(MelonAssemblies)\Il2CppPeroTools2.Account.dll - - - false - false - $(MelonAssemblies)\Il2CppSirenix.Serialization.dll - - - false - false - $(MelonAssemblies)\Il2CppSystem.Runtime.InteropServices.dll - - - false - false - $(MelonAssemblies)\Il2Cppspine-unity.dll - - - false - false - $(MelonAssemblies)\Unity.Addressables.dll - - - false - false - $(MelonAssemblies)\Unity.ResourceManager.dll - - - false - false - $(MelonAssemblies)\UnityEngine.AudioModule.dll - - - false - false - $(MelonAssemblies)\UnityEngine.ImageConversionModule.dll - - - false - false - $(MelonAssemblies)\UnityEngine.AnimationModule.dll - - - false - false - $(MelonAssemblies)\UnityEngine.CoreModule.dll - - - false - false - $(MelonAssemblies)\UnityEngine.UnityWebRequestModule.dll - - - false - false - $(MelonAssemblies)\UnityEngine.UI.dll - - - false - false - $(MelonAssemblies)\Il2CppDOTween.dll - - - false - false - $(MelonAssemblies)\Il2Cppspine-unity.dll - - + + false + False + $(MD_NET6_DIRECTORY) + $(MD_DIRECTORY) + $(GameFolder)\MelonLoader\ + $(MelonLoader)\net6\ + $(MelonLoader)\Il2CppAssemblies\ + + + + false + false + $(MelonNET6)\0Harmony.dll + + + false + false + $(MelonAssemblies)\Assembly-CSharp.dll + + + false + false + $(MelonAssemblies)\Assembly-CSharp-firstpass.dll + + + false + false + $(MelonAssemblies)\Il2Cppcom.prpr.log.dll + + + false + false + $(MelonAssemblies)\Il2CppDOTween.dll + + + false + false + $(MelonAssemblies)\Il2CppGoogle.Protobuf.dll + + + false + false + $(MelonNET6)\Il2CppInterop.Common.dll + + + false + false + $(MelonNET6)\Il2CppInterop.Generator.dll + + + false + false + $(MelonNET6)\Il2CppInterop.Runtime.dll + + + false + false + $(MelonAssemblies)\Il2Cppmscorlib.dll + + + false + false + $(MelonAssemblies)\Il2CppNAudio.dll + + + false + false + $(MelonAssemblies)\Il2CppNewtonsoft.Json.dll + + + false + false + $(MelonAssemblies)\Il2CppPeroString.dll + + + false + false + $(MelonAssemblies)\Il2CppPeroTools2.dll + + + false + false + $(MelonAssemblies)\Il2CppPeroTools2.Account.dll + + + false + false + $(MelonAssemblies)\Il2CppPeroTools2.Resources.dll + + + false + false + $(MelonAssemblies)\Il2CppSirenix.Serialization.dll + + + false + false + $(MelonAssemblies)\Il2Cppspine-unity.dll + + + false + false + $(MelonAssemblies)\Il2CppSystem.dll + + + false + false + $(MelonAssemblies)\Il2CppSystem.Core.dll + + + false + false + $(MelonAssemblies)\Il2CppSystem.Runtime.InteropServices.dll + + + false + false + $(MelonNET6)\MelonLoader.dll + + + false + false + $(MelonAssemblies)\Unity.Addressables.dll + + + false + false + $(MelonAssemblies)\Unity.ResourceManager.dll + + + false + false + $(MelonAssemblies)\UnityEngine.AnimationModule.dll + + + false + false + $(MelonAssemblies)\UnityEngine.AudioModule.dll + + + false + false + $(MelonAssemblies)\UnityEngine.CoreModule.dll + + + false + false + $(MelonAssemblies)\UnityEngine.ImageConversionModule.dll + + + false + false + $(MelonAssemblies)\UnityEngine.UI.dll + + + false + false + $(MelonAssemblies)\UnityEngine.UnityWebRequestModule.dll + + - - $(MsBuildThisFileDirectory)\Output\$(Configuration)\ - + + $(MsBuildThisFileDirectory)\Output\$(Configuration)\ + \ No newline at end of file From 2224a354f14ca450293fd72080e1f0c3a04c4e1b Mon Sep 17 00:00:00 2001 From: ALLMarvelous <53633401+ALLMarvelous@users.noreply.github.com> Date: Sun, 4 May 2025 03:52:40 -0500 Subject: [PATCH 02/10] CustomAlbums.csproj cleanup and get rid of weird Output directory --- CustomAlbums.csproj | 100 ++++++++++++++++++++++-------------------- Directory.Build.props | 4 -- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/CustomAlbums.csproj b/CustomAlbums.csproj index c5e7778..8fd6658 100644 --- a/CustomAlbums.csproj +++ b/CustomAlbums.csproj @@ -1,54 +1,58 @@  - - net6.0 - enable - disable - false - true - AnyCPU;x64 - true - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - $(OutputPath) + net6.0 + enable + disable + false + true + x64 + true + + + + + + + + + + - - - - - - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + - - - - - - - - - - - + + + $(OutputPath) + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index e46c1c8..8f8cf5d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -180,8 +180,4 @@ $(MelonAssemblies)\UnityEngine.UnityWebRequestModule.dll - - - $(MsBuildThisFileDirectory)\Output\$(Configuration)\ - \ No newline at end of file From 5ba424e4638012700e7b10c82a99b8d4837a8487 Mon Sep 17 00:00:00 2001 From: ALLMarvelous <53633401+ALLMarvelous@users.noreply.github.com> Date: Sun, 4 May 2025 16:41:25 -0500 Subject: [PATCH 03/10] Remove unnecessary log --- Patches/DataInjectPatch.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Patches/DataInjectPatch.cs b/Patches/DataInjectPatch.cs index 54cb197..51f9b31 100644 --- a/Patches/DataInjectPatch.cs +++ b/Patches/DataInjectPatch.cs @@ -1,6 +1,5 @@ using CustomAlbums.Data; using CustomAlbums.Managers; -using CustomAlbums.Utilities; using HarmonyLib; using Il2CppAssets.Scripts.Database; using Il2CppAssets.Scripts.PeroTools.Nice.Interface; @@ -16,7 +15,6 @@ namespace CustomAlbums.Patches internal class DataInjectPatch { internal static readonly IDataList DataList = new(); - private static readonly Logger Logger = new(nameof(DataInjectPatch)); // ReSharper disable once InconsistentNaming private static void Postfix(ref IDataList __result) @@ -28,13 +26,9 @@ private static void Postfix(ref IDataList __result) { var combined1 = new IDataList(); foreach (var item in highest) - { combined1.Add(item); - } foreach (var item in DataList) - { combined1.Add(item); - } __result = combined1; return; @@ -47,10 +41,7 @@ private static void Postfix(ref IDataList __result) foreach (var (difficulty, save) in albumDic) { if (!AlbumManager.LoadedAlbums.TryGetValue(albumName, out var album)) - { - Logger.Warning($"No album found for key {albumName}."); continue; - } var data = CreateIData(album, difficulty, save); DataList.Add(data); From b0a5d8186f5f4a38aef614a6672c86f6681b5a53 Mon Sep 17 00:00:00 2001 From: ALLMarvelous <53633401+ALLMarvelous@users.noreply.github.com> Date: Sun, 4 May 2025 16:41:50 -0500 Subject: [PATCH 04/10] Move ILRepack to a .targets file --- CustomAlbums.csproj | 30 ++++++++---------------------- ILRepack.targets | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 22 deletions(-) create mode 100644 ILRepack.targets diff --git a/CustomAlbums.csproj b/CustomAlbums.csproj index 8fd6658..36b7eb8 100644 --- a/CustomAlbums.csproj +++ b/CustomAlbums.csproj @@ -15,41 +15,27 @@ - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + contentFiles + - - - $(OutputPath) - - - - - - - - - - - - - - - + - + diff --git a/ILRepack.targets b/ILRepack.targets new file mode 100644 index 0000000..b189cb7 --- /dev/null +++ b/ILRepack.targets @@ -0,0 +1,18 @@ + + + + $(OutputPath) + + + + + + + + + + + + + + \ No newline at end of file From 80ebb4bbe05d478cc6da6eebffacdf865ec4f78c Mon Sep 17 00:00:00 2001 From: Ashton <53633401+ALLMarvelous@users.noreply.github.com> Date: Sun, 4 May 2025 16:57:54 -0500 Subject: [PATCH 05/10] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 350c952..ade8dcf 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,12 @@ This mod was written from the ground-up by [MDMC](https://github.com/MDMods), so ## Dependencies - [MelonLoader v0.6.1](https://github.com/LavaGang/MelonLoader/releases/tag/v0.6.1) - [Muse Dash on Steam](https://store.steampowered.com/app/774171/Muse_Dash/) +- [Muse Plus DLC on Steam](https://store.steampowered.com/app/2593750/Muse_Dash__Muse_Plus/) (or Just as Planned) ## Building - Install MelonLoader into Muse Dash and run it once - Run SetPath.cmd as administrator and follow the instructions -- Build tested with Visual Studio 2022, MelonLoader 0.6.1, Muse Dash 5.1.0 -- Will NOT work on MelonLoader 0.6.2. Newer versions might work, but 0.6.1 is recommended +- Build tested with Visual Studio 2022, MelonLoader v0.6.1, Muse Dash v5.3.0 +- Will NOT work on MelonLoader v0.6.2. Newer versions might work, but v0.6.1 is recommended ## Credits & Contributions - [ALLMarvelous](https://github.com/ALLMarvelous) - Lead Developer - [Mr. Talk](https://github.com/SB15-MD) - Lead Developer From 011849000ea586973d9676b921dd7a381225a919 Mon Sep 17 00:00:00 2001 From: ALLMarvelous <53633401+ALLMarvelous@users.noreply.github.com> Date: Sun, 4 May 2025 17:21:22 -0500 Subject: [PATCH 06/10] New IData extensions --- Data/{CustomChartSave.cs => ChartSave.cs} | 2 +- Data/CustomAlbumsSave.cs | 2 +- Managers/SaveManager.cs | 8 ++--- Patches/DataInjectPatch.cs | 3 +- Patches/SavePatch.cs | 2 +- Utilities/DataExtensions.cs | 36 ++++++++++++++++++++++- Utilities/SaveExtensions.cs | 2 +- 7 files changed, 44 insertions(+), 11 deletions(-) rename Data/{CustomChartSave.cs => ChartSave.cs} (92%) diff --git a/Data/CustomChartSave.cs b/Data/ChartSave.cs similarity index 92% rename from Data/CustomChartSave.cs rename to Data/ChartSave.cs index 9ee87e3..324dc58 100644 --- a/Data/CustomChartSave.cs +++ b/Data/ChartSave.cs @@ -1,6 +1,6 @@ namespace CustomAlbums.Data { - public class CustomChartSave + public class ChartSave { public int Evaluate { get; set; } = 0; public int Score { get; set; } = 0; diff --git a/Data/CustomAlbumsSave.cs b/Data/CustomAlbumsSave.cs index 83f950d..2542222 100644 --- a/Data/CustomAlbumsSave.cs +++ b/Data/CustomAlbumsSave.cs @@ -8,7 +8,7 @@ public class CustomAlbumsSave public HashSet Collections { get; set; } = new(); public HashSet Hides { get; set; } = new(); public Queue History { get; set; } = new(); - public Dictionary> Highest { get; set; } = new(); + public Dictionary> Highest { get; set; } = new(); public Dictionary> FullCombo { get; set; } = new(); internal bool IsEmpty() diff --git a/Managers/SaveManager.cs b/Managers/SaveManager.cs index 350ac8c..288e0e2 100644 --- a/Managers/SaveManager.cs +++ b/Managers/SaveManager.cs @@ -43,11 +43,11 @@ internal static void FixSaveFile() } // If we need to fix the highest - if (!firstHighest.Equals(default(KeyValuePair>)) && + if (!firstHighest.Equals(default(KeyValuePair>)) && firstHighest.Key.StartsWith("pkg_")) { var fixedDictionaryHighest = - new Dictionary>(SaveData.Highest.Count); + new Dictionary>(SaveData.Highest.Count); foreach (var (key, value) in SaveData.Highest.Where(kv => kv.Key.StartsWith("pkg_"))) { stringBuilder.Clear(); @@ -194,12 +194,12 @@ internal static void SaveScore(string uid, int musicDifficulty, int score, float var albumName = album.AlbumName; // Create new album save - SaveData.Highest.TryAdd(albumName, new Dictionary()); + SaveData.Highest.TryAdd(albumName, new Dictionary()); var currChartScore = SaveData.Highest[albumName]; // Create new save data if the difficulty doesn't exist - currChartScore.TryAdd(musicDifficulty, new CustomChartSave()); + currChartScore.TryAdd(musicDifficulty, new ChartSave()); // Set previous score for PnlVictory logic var newScore = currChartScore[musicDifficulty]; diff --git a/Patches/DataInjectPatch.cs b/Patches/DataInjectPatch.cs index 51f9b31..e78cf3c 100644 --- a/Patches/DataInjectPatch.cs +++ b/Patches/DataInjectPatch.cs @@ -70,7 +70,7 @@ private static void Postfix(ref IDataList __result) /// The difficulty of the chart. /// The CustomChartSave object containing the save data. /// - internal static IData CreateIData(Album album, int difficulty, CustomChartSave save) + internal static IData CreateIData(Album album, int difficulty, ChartSave save) { var data = new Il2CppAssets.Scripts.PeroTools.Nice.Datas.Data(); @@ -81,7 +81,6 @@ internal static IData CreateIData(Album album, int difficulty, CustomChartSave s data.fields.Add("accuracy", CreateIVariable(save.Accuracy)); data.fields.Add("accuracyStr", CreateIVariable(save.AccuracyStr)); data.fields.Add("clear", CreateIVariable(save.Clear)); - data.fields.Add("failCount", CreateIVariable(save.FailCount)); data.fields.Add("passed", CreateIVariable(save.Passed)); return data.Cast(); diff --git a/Patches/SavePatch.cs b/Patches/SavePatch.cs index 76489f4..945f7cc 100644 --- a/Patches/SavePatch.cs +++ b/Patches/SavePatch.cs @@ -58,7 +58,7 @@ internal static class SavePatch /// The instance to set. /// The custom chart data. /// If the selected chart has been FCed. - private static void SetPanelWithData(PnlRecord panel, CustomChartSave data, bool isFullCombo) + private static void SetPanelWithData(PnlRecord panel, ChartSave data, bool isFullCombo) { // Enables the FC icon if chart has been FCed // Also sets the combo text to a gold color if it has been FCed diff --git a/Utilities/DataExtensions.cs b/Utilities/DataExtensions.cs index 4448e82..d20e1bb 100644 --- a/Utilities/DataExtensions.cs +++ b/Utilities/DataExtensions.cs @@ -1,4 +1,5 @@ -using Il2CppAssets.Scripts.PeroTools.Nice.Interface; +using CustomAlbums.Data; +using Il2CppAssets.Scripts.PeroTools.Nice.Interface; namespace CustomAlbums.Utilities { @@ -39,5 +40,38 @@ public static int GetIndexByUid(this Il2CppSystem.Collections.Generic.List + /// Gets the IData object from a list by its uid and difficulty. + /// + /// The IData list. + /// The uid of the chart. + /// The difficulty of the chart. + /// The IData object, or null if not found. + public static IData GetIDataByUid(this Il2CppSystem.Collections.Generic.List dataList, string uid, int difficulty) + { + foreach (var data in dataList) + { + if (data.GetUid() == $"{uid}_{difficulty}") + { + return data; + } + } + + return null; + } + + public static ChartSave ToChartSave(this IData data) + { + return new ChartSave + { + Evaluate = data.fields["evaluate"].GetResult(), + Score = data.fields["score"].GetResult(), + Combo = data.fields["combo"].GetResult(), + Accuracy = data.fields["accuracy"].GetResult(), + AccuracyStr = data.fields["accuracyStr"].GetResult(), + Clear = data.fields["clear"].GetResult() + }; + } } } diff --git a/Utilities/SaveExtensions.cs b/Utilities/SaveExtensions.cs index d956636..c42ae04 100644 --- a/Utilities/SaveExtensions.cs +++ b/Utilities/SaveExtensions.cs @@ -11,7 +11,7 @@ public static class SaveExtensions // No need to make this part of the Data area since it's a fragment of other data classes public class SaveData { - public Dictionary Highest { get; set; } + public Dictionary Highest { get; set; } public List FullCombo { get; set; } } From e23c41c923ef5ec09602e7c84d1a5b915913e03e Mon Sep 17 00:00:00 2001 From: Super Balls Date: Sun, 4 May 2025 15:40:53 -0700 Subject: [PATCH 07/10] CAM-71 Fixed vanilla bug where the difficulty grade icon does not work properly on hidden charts where triggerDiff is not 3 --- Patches/DifficultyGradeIconPatch.cs | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Patches/DifficultyGradeIconPatch.cs diff --git a/Patches/DifficultyGradeIconPatch.cs b/Patches/DifficultyGradeIconPatch.cs new file mode 100644 index 0000000..eca89e3 --- /dev/null +++ b/Patches/DifficultyGradeIconPatch.cs @@ -0,0 +1,42 @@ +using CustomAlbums.Utilities; +using HarmonyLib; +using Il2Cpp; +using Il2CppAssets.Scripts.Database; +using Il2CppAssets.Scripts.PeroTools.Commons; +using Il2CppAssets.Scripts.UI.Panels; + +namespace CustomAlbums.Patches +{ + internal class DifficultyGradeIconPatch + { + /// + /// Fixes vanilla bug where the difficulty grade icon on hidden charts does not update properly when triggerDiff is not 3. + /// + [HarmonyPatch(typeof(PnlStage), nameof(PnlStage.RefreshDiffUI))] + internal class DiffUIFix + { + private static void Postfix(MusicInfo musicInfo, PnlStage __instance) + { + var uid = musicInfo?.uid; + var specialSongInstance = Singleton.instance; + + if (string.IsNullOrEmpty(uid) || !specialSongInstance.IsInvokeHideBms(uid)) return; + if (!specialSongInstance.m_HideBmsInfos.TryGetValue(uid, out var info)) return; + + // Get the hidden difficulty evaluate + var hiddenEval = DataHelper.highest.GetIDataByUid(uid, 4).ToChartSave().Evaluate; + + // The game handles case 3 already, don't need to reinvent the wheel here + switch (info.triggerDiff) + { + case 1: + __instance.m_Diff1Item.ChangeSchemeByEvalue(hiddenEval, __instance.globalData); + break; + case 2: + __instance.m_Diff2Item.ChangeSchemeByEvalue(hiddenEval, __instance.globalData); + break; + } + } + } + } +} From 2df0f5d275d0eeb04c0e2515e93a64f81c0ef935 Mon Sep 17 00:00:00 2001 From: ALLMarvelous <53633401+ALLMarvelous@users.noreply.github.com> Date: Mon, 5 May 2025 16:08:31 -0500 Subject: [PATCH 08/10] CAM-72 Disallow duplicates in History of CustomAlbums.json --- Data/CustomAlbumsSave.cs | 2 +- Managers/SaveManager.cs | 6 +++--- Patches/SavePatch.cs | 11 ++++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Data/CustomAlbumsSave.cs b/Data/CustomAlbumsSave.cs index 2542222..aa408b3 100644 --- a/Data/CustomAlbumsSave.cs +++ b/Data/CustomAlbumsSave.cs @@ -7,7 +7,7 @@ public class CustomAlbumsSave public HashSet UnlockedMasters { get; set; } = new(); public HashSet Collections { get; set; } = new(); public HashSet Hides { get; set; } = new(); - public Queue History { get; set; } = new(); + public List History { get; set; } = new(); public Dictionary> Highest { get; set; } = new(); public Dictionary> FullCombo { get; set; } = new(); diff --git a/Managers/SaveManager.cs b/Managers/SaveManager.cs index 288e0e2..145ac78 100644 --- a/Managers/SaveManager.cs +++ b/Managers/SaveManager.cs @@ -29,17 +29,17 @@ internal static void FixSaveFile() // If we need to fix the history if (firstHistory != null && firstHistory.StartsWith("pkg_")) { - var fixedQueue = new Queue(SaveData.History.Count); + var fixedList = new List(SaveData.History.Count); foreach (var history in SaveData.History.Where(history => history.StartsWith("pkg_"))) { stringBuilder.Clear(); stringBuilder.Append(history); stringBuilder.Remove(0, 4); stringBuilder.Insert(0, "album_"); - fixedQueue.Enqueue(stringBuilder.ToString()); + fixedList.Add(stringBuilder.ToString()); } - SaveData.History = fixedQueue; + SaveData.History = fixedList; } // If we need to fix the highest diff --git a/Patches/SavePatch.cs b/Patches/SavePatch.cs index 945f7cc..a924c29 100644 --- a/Patches/SavePatch.cs +++ b/Patches/SavePatch.cs @@ -381,10 +381,15 @@ private static bool Prefix(string musicUid) if (!musicUid.StartsWith($"{AlbumManager.Uid}-")) return true; if (!ModSettings.SavingEnabled) return false; - if (SaveData.History.Count == 10) - SaveData.History.Dequeue(); + var albumName = AlbumManager.GetAlbumNameFromUid(musicUid); + + // Remove album from history if it exists + SaveData.History.Remove(albumName); + SaveData.History.Add(albumName); + + if (SaveData.History.Count > 10) + SaveData.History.RemoveAt(0); - SaveData.History.Enqueue(AlbumManager.GetAlbumNameFromUid(musicUid)); return true; } } From 713cc274f02b367818fb3be1e721571d8eb6cb6f Mon Sep 17 00:00:00 2001 From: ALLMarvelous <53633401+ALLMarvelous@users.noreply.github.com> Date: Mon, 5 May 2025 17:06:30 -0500 Subject: [PATCH 09/10] CAM-70 Remove custom level configs from save file --- Patches/SavePatch.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Patches/SavePatch.cs b/Patches/SavePatch.cs index a924c29..a059573 100644 --- a/Patches/SavePatch.cs +++ b/Patches/SavePatch.cs @@ -236,6 +236,15 @@ private static void CleanCustomData() DataHelper.highest.RemoveAll( (Il2CppSystem.Predicate)(data => data.GetUid().StartsWith($"{AlbumManager.Uid}-"))); + var keysToRemove = new List(); + + foreach (var kvp in DataHelper.dicLevelConfig) + if (kvp.key.StartsWith("999")) + keysToRemove.Add(kvp.key); + + foreach (var key in keysToRemove) + DataHelper.dicLevelConfig.Remove(key); + if (DataHelper.selectedAlbumUid == "music_package_999") DataHelper.selectedAlbumUid = "music_package_0"; From 8e19ff11d5cb42685c1816da957032dfd6765600 Mon Sep 17 00:00:00 2001 From: ALLMarvelous <53633401+ALLMarvelous@users.noreply.github.com> Date: Mon, 5 May 2025 17:32:54 -0500 Subject: [PATCH 10/10] Bump version for release --- Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main.cs b/Main.cs index 281d040..66d9346 100644 --- a/Main.cs +++ b/Main.cs @@ -12,7 +12,7 @@ public class Main : MelonMod public const string MelonName = "CustomAlbums"; public const string MelonAuthor = "Two Fellas"; - public const string MelonVersion = "4.1.7"; + public const string MelonVersion = "4.1.8"; public override void OnInitializeMelon() {