diff --git a/AquaMai/AquaMai.Config/Migration/ConfigMigration_V1_0_V2_0.cs b/AquaMai/AquaMai.Config/Migration/ConfigMigration_V1_0_V2_0.cs index 3b46ca0a..ae6226d0 100644 --- a/AquaMai/AquaMai.Config/Migration/ConfigMigration_V1_0_V2_0.cs +++ b/AquaMai/AquaMai.Config/Migration/ConfigMigration_V1_0_V2_0.cs @@ -133,7 +133,7 @@ public IConfigView Migrate(IConfigView src) if (src.GetValueOrDefault("Fix.ForcePaidPlay")) { dst.SetValue("GameSettings.CreditConfig.IsFreePlay", false); - dst.SetValue("GameSettings.CreditConfig.LockCredits", 24); + dst.SetValue("GameSettings.CreditConfig.LockCredits", 24u); } MapValueToEntryValueIfNonNullOrDefault(src, dst, "Fix.ExtendNotesPool", "Fancy.GamePlay.ExtendNotesPool.Count", 0); MapBooleanTrueToSectionEnable(src, dst, "Fix.FrameRateLock", "Tweaks.LockFrameRate"); @@ -159,7 +159,7 @@ public IConfigView Migrate(IConfigView src) MapBooleanTrueToSectionEnable(src, dst, "Utils.LogUserId", "Utils.LogUserId"); MapValueToEntryValueIfNonNullOrDefault(src, dst, "Utils.JudgeAdjustA", "GameSettings.JudgeAdjust.A", 0); MapValueToEntryValueIfNonNullOrDefault(src, dst, "Utils.JudgeAdjustB", "GameSettings.JudgeAdjust.B", 0); - MapValueToEntryValueIfNonNullOrDefault(src, dst, "Utils.TouchDelay", "GameSettings.JudgeAdjust.TouchDelay", 0); + MapValueToEntryValueIfNonNullOrDefault(src, dst, "Utils.TouchDelay", "GameSettings.JudgeAdjust.TouchDelay", 0u); MapBooleanTrueToSectionEnable(src, dst, "Utils.SelectionDetail", "UX.SelectionDetail"); MapBooleanTrueToSectionEnable(src, dst, "Utils.ShowNetErrorDetail", "Utils.ShowNetErrorDetail"); MapBooleanTrueToSectionEnable(src, dst, "Utils.ShowErrorLog", "Utils.ShowErrorLog"); diff --git a/AquaMai/AquaMai.Mods/GameSettings/CreditConfig.cs b/AquaMai/AquaMai.Mods/GameSettings/CreditConfig.cs index 132de3d3..52b472f4 100644 --- a/AquaMai/AquaMai.Mods/GameSettings/CreditConfig.cs +++ b/AquaMai/AquaMai.Mods/GameSettings/CreditConfig.cs @@ -25,7 +25,7 @@ private static bool PreIsFreePlay(ref bool __result) [ConfigEntry( en: "Lock credits amount (only valid in Paid Play). Set to 0 to disable.", zh: "锁定可用点数数量(仅在付费游玩时有效),设为 0 以禁用")] - private static readonly uint lockCredits = 24; + private static readonly uint lockCredits = 24u; private static bool ShouldLockCredits => !isFreePlay && lockCredits > 0; @@ -43,7 +43,7 @@ private static bool PreIsGameCostEnough(ref bool __result) [HarmonyPatch(typeof(AMDaemon.CreditUnit), "Credit", MethodType.Getter)] private static bool PreCredit(ref uint __result) { - __result = 24; + __result = lockCredits; return false; } }