fix: Level display shift when level number not match display level
Build AquaMai / build (SDEZ141) (push) Has been cancelled Details
Build AquaMai / build (SDGA145) (push) Has been cancelled Details

pull/55/head
Clansty 2024-09-08 17:09:38 +08:00
parent 1ad4ac2d63
commit 9b7f2b3a79
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 20 additions and 0 deletions

View File

@ -2,6 +2,7 @@
using HarmonyLib;
using Manager;
using Manager.Operation;
using Monitor.MusicSelect.ChainList;
using Net;
using UnityEngine;
@ -73,4 +74,23 @@ public class BasicFix
__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;
}
}
}