From f76a027b3208e78ecacb3b6ff94b2af1e90ca6ff Mon Sep 17 00:00:00 2001 From: Tianyi Cao Date: Wed, 7 Feb 2024 20:08:33 -0800 Subject: [PATCH] add a few more comments --- AquaMai/Fix/FixCharaCrash.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AquaMai/Fix/FixCharaCrash.cs b/AquaMai/Fix/FixCharaCrash.cs index 2ef9c4df..36d58b3f 100644 --- a/AquaMai/Fix/FixCharaCrash.cs +++ b/AquaMai/Fix/FixCharaCrash.cs @@ -26,10 +26,12 @@ namespace AquaMai.Fix __result = MapMaster.GetSlotData(1); } + // This is called when loading the music selection screen, to display characters on the top screen [HarmonyPrefix] [HarmonyPatch(typeof(Monitor.CommonMonitor), "SetCharacterSlot", new Type[] { typeof(MessageCharactorInfomationData) })] public static bool SetCharacterSlot(ref MessageCharactorInfomationData data, Dictionary ____characterSlotData) { + // Some characters are not found in this dictionary. We simply skip loading those characters if (!____characterSlotData.ContainsKey(data.MapKey)) { Console.Log($"Could not get CharacterSlotData for character [Index={data.Index}, MapKey={data.MapKey}], ignoring...");