mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-14 04:07:31 +08:00
[+] Configurable mod key map manager
This commit is contained in:
28
AquaMai/Fix/FestivalQuickRetryFix.cs
Normal file
28
AquaMai/Fix/FestivalQuickRetryFix.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using AquaMai.Attributes;
|
||||
using HarmonyLib;
|
||||
using Manager;
|
||||
|
||||
namespace AquaMai.Fix;
|
||||
|
||||
[GameVersion(23000, 23499)]
|
||||
public class FestivalQuickRetryFix
|
||||
{
|
||||
// Fix for the game not resetting Fast and Late counts when quick retrying
|
||||
// For game version < 1.35.0
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(GamePlayManager), "SetQuickRetryFrag")]
|
||||
public static void PostGamePlayManagerSetQuickRetryFrag(GamePlayManager __instance, bool flag)
|
||||
{
|
||||
// Since 1.35.0, `GameScoreList.Initialize()` resets the Fast and Late counts
|
||||
if (flag && !Traverse.Create(typeof(GameScoreList)).Methods().Contains("Initialize"))
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
var gameScoreList = __instance.GetGameScore(i);
|
||||
var traverse = Traverse.Create(gameScoreList);
|
||||
traverse.Property("Fast").SetValue((uint)0);
|
||||
traverse.Property("Late").SetValue((uint)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user