上传文件至 Cheat
This commit is contained in:
32
Cheat/UnlockMaster.cs
Normal file
32
Cheat/UnlockMaster.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user