上传文件至 Cheat
This commit is contained in:
19
Cheat/UnlockMusic.cs
Normal file
19
Cheat/UnlockMusic.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using HarmonyLib;
|
||||
using Manager;
|
||||
using SinmaiAssist.Utils;
|
||||
|
||||
namespace SinmaiAssist.Cheat;
|
||||
|
||||
public class UnlockMusic
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(NotesListManager), "IsUnlockBase")]
|
||||
public static void UnlockBase(ref bool __result,ref int id, ref int index)
|
||||
{
|
||||
if (__result == false && SinmaiAssist.MainConfig.Cheat.SaveUnlockMusic)
|
||||
{
|
||||
User.GetUserData(index).AddUnlockMusic(UserData.MusicUnlock.Base, id);
|
||||
}
|
||||
__result = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user