diff --git a/AquaMai/AquaMai.csproj b/AquaMai/AquaMai.csproj
index 82d53ee0..a83253de 100644
--- a/AquaMai/AquaMai.csproj
+++ b/AquaMai/AquaMai.csproj
@@ -336,6 +336,7 @@ DEBUG
+
diff --git a/AquaMai/AquaMai.toml b/AquaMai/AquaMai.toml
index 7199a172..07c4d557 100644
--- a/AquaMai/AquaMai.toml
+++ b/AquaMai/AquaMai.toml
@@ -14,6 +14,8 @@ UnlockUtage=true
[UX]
# Single player: Show 1P only, at the center of the screen
SinglePlayer=true
+# Remove the circle mask in the game
+HideMask=true
# Set the version string displayed at the top-right corner of the screen
CustomVersionString=""
# Deprecated: Use `LoadAssetsPng` instead
diff --git a/AquaMai/AquaMai.zh.toml b/AquaMai/AquaMai.zh.toml
index 30264f27..2a2666bc 100644
--- a/AquaMai/AquaMai.zh.toml
+++ b/AquaMai/AquaMai.zh.toml
@@ -17,6 +17,8 @@ UnlockUtage=true
[UX]
# 单人模式,不显示 2P
SinglePlayer=true
+# 移除遮罩
+HideMask=true
# 把右上角的版本更改为自定义文本
CustomVersionString=""
# 已弃用,请使用 LoadAssetsPng
diff --git a/AquaMai/Config.cs b/AquaMai/Config.cs
index e51e7bca..be04e42a 100644
--- a/AquaMai/Config.cs
+++ b/AquaMai/Config.cs
@@ -26,6 +26,7 @@ namespace AquaMai
{
public string Locale { get; set; }
public bool SinglePlayer { get; set; }
+ public bool HideMask { get; set; }
public bool LoadAssetsPng { get; set; }
public bool LoadJacketPng { get; set; }
public bool LoadAssetBundleWithoutManifest { get; set; }
diff --git a/AquaMai/UX/HideMask.cs b/AquaMai/UX/HideMask.cs
new file mode 100644
index 00000000..18c26680
--- /dev/null
+++ b/AquaMai/UX/HideMask.cs
@@ -0,0 +1,14 @@
+using HarmonyLib;
+using UnityEngine;
+
+namespace AquaMai.UX;
+
+public class HideMask
+{
+ [HarmonyPrefix]
+ [HarmonyPatch(typeof(Main.GameMain), "LateInitialize", typeof(MonoBehaviour), typeof(Transform), typeof(Transform))]
+ public static void LateInitialize(MonoBehaviour gameMainObject)
+ {
+ GameObject.Find("Mask").SetActive(false);
+ }
+}
diff --git a/AquaMai/UX/SinglePlayer.cs b/AquaMai/UX/SinglePlayer.cs
index 84c09252..8f419914 100644
--- a/AquaMai/UX/SinglePlayer.cs
+++ b/AquaMai/UX/SinglePlayer.cs
@@ -16,13 +16,10 @@ namespace AquaMai.UX
{
[HarmonyPrefix]
[HarmonyPatch(typeof(Main.GameMain), "LateInitialize", new Type[] { typeof(MonoBehaviour), typeof(Transform), typeof(Transform) })]
- public static bool LateInitialize(MonoBehaviour gameMainObject, ref Transform left, ref Transform right)
+ public static void LateInitialize(MonoBehaviour gameMainObject, ref Transform left, ref Transform right)
{
left.transform.position = Vector3.zero;
right.localScale = Vector3.zero;
- GameObject.Find("Mask").SetActive(false);
-
- return true;
}
[HarmonyPrefix]
@@ -55,4 +52,4 @@ namespace AquaMai.UX
return false;
}
}
-}
\ No newline at end of file
+}