Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Menci committed Jan 26, 2025
1 parent 18b042f commit d7ce7b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion AquaMai.Mods/Fix/Stability/FixMissingCharaCrash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static void GetMapColorData(int colorID, ref CharacterMapColorData __resu
{
if (__result != null) return;

// NOTE: should not reach here.
// Fall back to the first map's color if the color is missing.
var firstMapId = DataManager.Instance.GetMapDatas().First().Key;
MelonLogger.Warning($"[FixMissingCharaCrash] CharacterMapColorData for [MapId={colorID}] is missing, falling back to [MapId={firstMapId}]");
Expand All @@ -33,14 +34,15 @@ public static void GetMapColorData(int colorID, ref CharacterMapColorData __resu
__result = mapColorData;
}

// This is called when loading the music selection screen, to display characters on the top screen
// This is called when loading the music selection screen, to display characters on the top screen.
[HarmonyPrefix]
[HarmonyPatch(typeof(CommonMonitor), "SetCharacterSlot", [typeof(MessageCharactorInfomationData)])]
public static bool SetCharacterSlot(ref MessageCharactorInfomationData data, Dictionary<int, CharacterSlotData> ____characterSlotData)
{
// Some characters are not found in this dictionary. We simply skip loading those characters
if (!____characterSlotData.ContainsKey(data.MapKey))
{
// NOTE: should not reach here.
MelonLogger.Warning($"[FixMissingCharaCrash] Could not get CharacterSlotData for character [Index={data.Index}, MapKey={data.MapKey}], ignoring");
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions AquaMai.Mods/GameSystem/Unlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ namespace AquaMai.Mods.GameSystem;
[ConfigSection(
en: """
Unlock normally locked (including normally non-unlockable) game content.
Anything unlocked (except the characters you selected) by this mod will not be uploaded your account.
Anything unlocked (except the characters you leveled-up) by this mod will not be uploaded your account.
You'll still "get" those musics/collections/courses by normal plays.
""",
zh: """
解锁原本锁定(包括正常途径无法解锁)的游戏内容
由本 Mod 解锁的内容(除了被你选择的角色以外)不会上传到你的账户
由本 Mod 解锁的内容(除了被你升级过的角色以外)不会上传到你的账户
你仍然可以通过正常游玩来「获得」那些乐曲/收藏品/段位
""")]
public class Unlock
Expand Down

0 comments on commit d7ce7b8

Please sign in to comment.