From 3d36005d149f5bdf9529f212b3a3b6a74502e199 Mon Sep 17 00:00:00 2001 From: Clansty Date: Wed, 4 Dec 2024 11:27:28 +0800 Subject: [PATCH] [+] unlock all song --- AquaMai.Mods/GameSystem/Unlock.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/AquaMai.Mods/GameSystem/Unlock.cs b/AquaMai.Mods/GameSystem/Unlock.cs index 0e867813..6b6f548a 100644 --- a/AquaMai.Mods/GameSystem/Unlock.cs +++ b/AquaMai.Mods/GameSystem/Unlock.cs @@ -36,6 +36,20 @@ public class Unlock return false; } + [ConfigEntry( + en: "Unlock all songs (Same as setting AllOpen=1 in mai2.ini).", + zh: "解锁所有乐曲(和 mai2.ini 里面设置 AllOpen=1 是一样的效果)")] + private static readonly bool songs = true; + + [EnableIf(nameof(songs))] + [HarmonyPrefix] + [HarmonyPatch(typeof(MAI2System.Config), "IsAllOpen", MethodType.Getter)] + public static bool IsAllOpen(ref bool __result) + { + __result = true; + return false; + } + [ConfigEntry( en: "Unlock normally event-only tickets.", zh: "解锁游戏里所有可能的跑图券")]