Skip to content

Commit

Permalink
fix: Level display shift when level number not match display level
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Sep 8, 2024
1 parent 1ad4ac2 commit 9b7f2b3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions AquaMai/Fix/BasicFix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using HarmonyLib;
using Manager;
using Manager.Operation;
using Monitor.MusicSelect.ChainList;
using Net;
using UnityEngine;

Expand Down Expand Up @@ -73,4 +74,23 @@ private static bool CalcSpecialNum(ref int __result)
__result = 1024;
return false;
}

[HarmonyPostfix]
[HarmonyPatch(typeof(MusicChainCardObejct), "SetLevel")]
private static void FixLevelShift(MusicLevelID levelID, ref SpriteCounter ____digitLevel, ref SpriteCounter ____doubleDigitLevel)
{
switch (levelID)
{
case > MusicLevelID.Level9P:
____digitLevel.gameObject.SetActive(value: false);
____doubleDigitLevel.gameObject.SetActive(value: true);
____doubleDigitLevel.ChangeText(levelID.GetLevelNum().PadRight(3));
break;
case >= MusicLevelID.None:
____digitLevel.gameObject.SetActive(value: true);
____doubleDigitLevel.gameObject.SetActive(value: false);
____digitLevel.ChangeText(levelID.GetLevelNum().PadRight(2));
break;
}
}
}

0 comments on commit 9b7f2b3

Please sign in to comment.