上传文件至 Cheat

This commit is contained in:
2025-10-13 18:18:32 +08:00
parent dc6087211e
commit 535e955faf
12 changed files with 1334 additions and 0 deletions

32
Cheat/UnlockMaster.cs Normal file
View File

@@ -0,0 +1,32 @@
using HarmonyLib;
using MAI2.Util;
using Manager;
using SinmaiAssist.Utils;
namespace SinmaiAssist.Cheat;
public class UnlockMaster
{
[HarmonyPostfix]
[HarmonyPatch(typeof(NotesListManager), "IsUnlockMaster")]
public static void IsUnlockMaster(ref bool __result, ref int id, ref int index)
{
if (__result == false && SinmaiAssist.MainConfig.Cheat.SaveUnlockMaster)
{
User.GetUserData(index).AddUnlockMusic(UserData.MusicUnlock.Master, id);
}
__result = true;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(NotesListManager), "IsUnlockReMaster")]
public static void IsUnlockReMaster(ref bool __result, ref int id, ref int index)
{
if (Singleton<UserDataManager>.Instance.GetUserData(index).IsEntry) return;
if (__result == false && SinmaiAssist.MainConfig.Cheat.SaveUnlockMaster)
{
User.GetUserData(index).AddUnlockMusic(UserData.MusicUnlock.ReMaster, id);
}
__result = true;
}
}