mirror of https://github.com/hykilpikonna/AquaDX
[F] unused lockCredits
AquaMai Build / build (push) Has been cancelled
Details
AquaMai Build / build (push) Has been cancelled
Details
parent
da36ef4002
commit
07210a23b7
|
@ -133,7 +133,7 @@ public class ConfigMigration_V1_0_V2_0 : IConfigMigration
|
||||||
if (src.GetValueOrDefault<bool>("Fix.ForcePaidPlay"))
|
if (src.GetValueOrDefault<bool>("Fix.ForcePaidPlay"))
|
||||||
{
|
{
|
||||||
dst.SetValue("GameSettings.CreditConfig.IsFreePlay", false);
|
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);
|
MapValueToEntryValueIfNonNullOrDefault(src, dst, "Fix.ExtendNotesPool", "Fancy.GamePlay.ExtendNotesPool.Count", 0);
|
||||||
MapBooleanTrueToSectionEnable(src, dst, "Fix.FrameRateLock", "Tweaks.LockFrameRate");
|
MapBooleanTrueToSectionEnable(src, dst, "Fix.FrameRateLock", "Tweaks.LockFrameRate");
|
||||||
|
@ -159,7 +159,7 @@ public class ConfigMigration_V1_0_V2_0 : IConfigMigration
|
||||||
MapBooleanTrueToSectionEnable(src, dst, "Utils.LogUserId", "Utils.LogUserId");
|
MapBooleanTrueToSectionEnable(src, dst, "Utils.LogUserId", "Utils.LogUserId");
|
||||||
MapValueToEntryValueIfNonNullOrDefault<double>(src, dst, "Utils.JudgeAdjustA", "GameSettings.JudgeAdjust.A", 0);
|
MapValueToEntryValueIfNonNullOrDefault<double>(src, dst, "Utils.JudgeAdjustA", "GameSettings.JudgeAdjust.A", 0);
|
||||||
MapValueToEntryValueIfNonNullOrDefault<double>(src, dst, "Utils.JudgeAdjustB", "GameSettings.JudgeAdjust.B", 0);
|
MapValueToEntryValueIfNonNullOrDefault<double>(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.SelectionDetail", "UX.SelectionDetail");
|
||||||
MapBooleanTrueToSectionEnable(src, dst, "Utils.ShowNetErrorDetail", "Utils.ShowNetErrorDetail");
|
MapBooleanTrueToSectionEnable(src, dst, "Utils.ShowNetErrorDetail", "Utils.ShowNetErrorDetail");
|
||||||
MapBooleanTrueToSectionEnable(src, dst, "Utils.ShowErrorLog", "Utils.ShowErrorLog");
|
MapBooleanTrueToSectionEnable(src, dst, "Utils.ShowErrorLog", "Utils.ShowErrorLog");
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class CreditConfig
|
||||||
[ConfigEntry(
|
[ConfigEntry(
|
||||||
en: "Lock credits amount (only valid in Paid Play). Set to 0 to disable.",
|
en: "Lock credits amount (only valid in Paid Play). Set to 0 to disable.",
|
||||||
zh: "锁定可用点数数量(仅在付费游玩时有效),设为 0 以禁用")]
|
zh: "锁定可用点数数量(仅在付费游玩时有效),设为 0 以禁用")]
|
||||||
private static readonly uint lockCredits = 24;
|
private static readonly uint lockCredits = 24u;
|
||||||
|
|
||||||
private static bool ShouldLockCredits => !isFreePlay && lockCredits > 0;
|
private static bool ShouldLockCredits => !isFreePlay && lockCredits > 0;
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public class CreditConfig
|
||||||
[HarmonyPatch(typeof(AMDaemon.CreditUnit), "Credit", MethodType.Getter)]
|
[HarmonyPatch(typeof(AMDaemon.CreditUnit), "Credit", MethodType.Getter)]
|
||||||
private static bool PreCredit(ref uint __result)
|
private static bool PreCredit(ref uint __result)
|
||||||
{
|
{
|
||||||
__result = 24;
|
__result = lockCredits;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue