mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-26 04:22:38 +00:00
[+] Global judge adjust
This commit is contained in:
parent
ef832461c0
commit
5128db9f6c
@ -305,6 +305,7 @@
|
|||||||
<Compile Include="Performance\ImproveLoadSpeed.cs" />
|
<Compile Include="Performance\ImproveLoadSpeed.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Main.cs" />
|
<Compile Include="Main.cs" />
|
||||||
|
<Compile Include="Utils\JudgeAdjust.cs" />
|
||||||
<Compile Include="Utils\LogUserId.cs" />
|
<Compile Include="Utils\LogUserId.cs" />
|
||||||
<Compile Include="UX\CustomPlaceName.cs" />
|
<Compile Include="UX\CustomPlaceName.cs" />
|
||||||
<Compile Include="UX\CustomVersionString.cs" />
|
<Compile Include="UX\CustomVersionString.cs" />
|
||||||
|
|||||||
@ -78,3 +78,9 @@ ExtendNotesPool=128
|
|||||||
[Utils]
|
[Utils]
|
||||||
# Log user ID on login
|
# Log user ID on login
|
||||||
LogUserId=false
|
LogUserId=false
|
||||||
|
# Globally increase A judgment, unit is the same as in the game
|
||||||
|
JudgeAdjustA=0.0
|
||||||
|
# Globally increase B judgment, unit is the same as in the game
|
||||||
|
JudgeAdjustB=0.0
|
||||||
|
# Touch screen delay, unit is milliseconds, one second = 1000 milliseconds. Must be an integer
|
||||||
|
TouchDelay=0
|
||||||
|
|||||||
@ -94,3 +94,9 @@ ExtendNotesPool=128
|
|||||||
[Utils]
|
[Utils]
|
||||||
# 登录时将 UserID 输出到日志
|
# 登录时将 UserID 输出到日志
|
||||||
LogUserId=false
|
LogUserId=false
|
||||||
|
# 全局增加 A 判,单位和游戏里一样
|
||||||
|
JudgeAdjustA=0.0
|
||||||
|
# 全局增加 B 判,单位和游戏里一样
|
||||||
|
JudgeAdjustB=0.0
|
||||||
|
# 触摸屏延迟,单位为毫秒,一秒 = 1000 毫秒。必须是整数
|
||||||
|
TouchDelay=0
|
||||||
|
|||||||
@ -62,6 +62,9 @@ namespace AquaMai
|
|||||||
public class UtilsConfig
|
public class UtilsConfig
|
||||||
{
|
{
|
||||||
public bool LogUserId { get; set; }
|
public bool LogUserId { get; set; }
|
||||||
|
public float JudgeAdjustA { get; set; }
|
||||||
|
public float JudgeAdjustB { get; set; }
|
||||||
|
public int TouchDelay { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ using System.IO;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using AquaMai.Fix;
|
using AquaMai.Fix;
|
||||||
using AquaMai.Helpers;
|
using AquaMai.Helpers;
|
||||||
|
using AquaMai.Utils;
|
||||||
using AquaMai.UX;
|
using AquaMai.UX;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using Tomlet;
|
using Tomlet;
|
||||||
@ -132,6 +133,8 @@ namespace AquaMai
|
|||||||
Patch(typeof(CustomVersionString));
|
Patch(typeof(CustomVersionString));
|
||||||
Patch(typeof(CustomPlaceName));
|
Patch(typeof(CustomPlaceName));
|
||||||
Patch(typeof(RunCommandOnEvents));
|
Patch(typeof(RunCommandOnEvents));
|
||||||
|
// Utils
|
||||||
|
Patch(typeof(JudgeAdjust));
|
||||||
|
|
||||||
// Apply patches based on the settings
|
// Apply patches based on the settings
|
||||||
ApplyPatches();
|
ApplyPatches();
|
||||||
|
|||||||
31
AquaMai/Utils/JudgeAdjust.cs
Normal file
31
AquaMai/Utils/JudgeAdjust.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using System.Threading;
|
||||||
|
using HarmonyLib;
|
||||||
|
using IO;
|
||||||
|
using Manager.UserDatas;
|
||||||
|
|
||||||
|
namespace AquaMai.Utils;
|
||||||
|
|
||||||
|
public class JudgeAdjust
|
||||||
|
{
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(UserOption), "GetAdjustMSec")]
|
||||||
|
public static void GetAdjustMSec(ref float __result)
|
||||||
|
{
|
||||||
|
__result += AquaMai.AppConfig.Utils.JudgeAdjustA * 16.666666f;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(UserOption), "GetJudgeTimingFrame")]
|
||||||
|
public static void GetJudgeTimingFrame(ref float __result)
|
||||||
|
{
|
||||||
|
__result += AquaMai.AppConfig.Utils.JudgeAdjustB;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(NewTouchPanel), "Recv")]
|
||||||
|
public static void NewTouchPanelRecv()
|
||||||
|
{
|
||||||
|
if (AquaMai.AppConfig.Utils.TouchDelay <= 0) return;
|
||||||
|
Thread.Sleep(AquaMai.AppConfig.Utils.TouchDelay);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user