From 0f701ad2d36240e4f28f4bbc2217a3ac82a51977 Mon Sep 17 00:00:00 2001 From: Clansty Date: Wed, 19 Jun 2024 20:55:31 +0800 Subject: [PATCH] [+] Unlock Utage --- AquaMai/AquaMai.csproj | 1 + AquaMai/AquaMai.toml | 2 ++ AquaMai/Cheat/UnlockUtage.cs | 18 ++++++++++++++++++ AquaMai/Config.cs | 1 + 4 files changed, 22 insertions(+) create mode 100644 AquaMai/Cheat/UnlockUtage.cs diff --git a/AquaMai/AquaMai.csproj b/AquaMai/AquaMai.csproj index d5e9722e..441f26a7 100644 --- a/AquaMai/AquaMai.csproj +++ b/AquaMai/AquaMai.csproj @@ -268,6 +268,7 @@ + diff --git a/AquaMai/AquaMai.toml b/AquaMai/AquaMai.toml index 05ce634f..470baa96 100644 --- a/AquaMai/AquaMai.toml +++ b/AquaMai/AquaMai.toml @@ -6,6 +6,8 @@ TicketUnlock=true # Unlock maps that are not in this version MapUnlock=true +# Unlock Utage without the need of DXRating 10000 +UnlockUtage=true # =================================== # UX: User Experience Improvements diff --git a/AquaMai/Cheat/UnlockUtage.cs b/AquaMai/Cheat/UnlockUtage.cs new file mode 100644 index 00000000..7bf3ced7 --- /dev/null +++ b/AquaMai/Cheat/UnlockUtage.cs @@ -0,0 +1,18 @@ +using HarmonyLib; +using MAI2System; +using Manager; + +namespace AquaMai.Cheat +{ + public class UnlockUtage + { + [HarmonyPrefix] + [HarmonyPatch(typeof(GameManager), "CanUnlockUtageTotalJudgement")] + public static bool CanUnlockUtageTotalJudgement(out ConstParameter.ResultOfUnlockUtageJudgement result1P, out ConstParameter.ResultOfUnlockUtageJudgement result2P) + { + result1P = ConstParameter.ResultOfUnlockUtageJudgement.Unlocked; + result2P = ConstParameter.ResultOfUnlockUtageJudgement.Unlocked; + return false; + } + } +} \ No newline at end of file diff --git a/AquaMai/Config.cs b/AquaMai/Config.cs index 7d036dbc..95f0f8a8 100644 --- a/AquaMai/Config.cs +++ b/AquaMai/Config.cs @@ -13,6 +13,7 @@ namespace AquaMai { public bool TicketUnlock { get; set; } public bool MapUnlock { get; set; } + public bool UnlockUtage { get; set; } } public class UXConfig