上传文件至 Common

This commit is contained in:
2025-10-13 18:18:47 +08:00
parent 535e955faf
commit 566c6190ff
25 changed files with 1487 additions and 0 deletions

24
Common/DisableMask.cs Normal file
View File

@@ -0,0 +1,24 @@
using System;
using HarmonyLib;
using MelonLoader;
using UnityEngine;
namespace SinmaiAssist.Common;
public class DisableMask
{
[HarmonyPrefix]
[HarmonyPatch(typeof(Main.GameMain), "LateInitialize", new System.Type[] { typeof(MonoBehaviour), typeof(Transform), typeof(Transform) })]
public static bool LateInitialize(MonoBehaviour gameMainObject, ref Transform left, ref Transform right)
{
try
{
GameObject.Find("Mask").SetActive(false);
}
catch (Exception e)
{
MelonLogger.Warning("Maybe the current Sinmai build does not have GameObject \"Mask\".");
}
return true;
}
}