Skip to content

Commit f02f61d

Browse files
committed
[+] OptionLoadFix overridePath
1 parent 07df172 commit f02f61d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

AquaMai.Mods/GameSystem/ExteraMouseInput.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public partial class ExteraMouseInput
3636
[HarmonyPatch(typeof(MouseTouchPanel), "Start")]
3737
public static void MouseTouchPanelStart(MouseTouchPanel __instance)
3838
{
39+
MelonLogger.Msg(AMDaemon.AppImage.OptionMountRootPath);
3940
var player = __instance.transform.parent.parent.name.Equals("LeftMonitor") ? 0 : 1;
4041
UnityEngine.Object.Destroy(__instance.transform.parent.GetComponent<GraphicRaycaster>());
4142
__instance.transform.parent.gameObject.AddComponent<MeshButtonRaycaster>();

AquaMai.Mods/GameSystem/OptionLoadFix.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ namespace AquaMai.Mods.GameSystem;
1515
defaultOn: true)]
1616
public static class OptionLoadFix
1717
{
18+
[ConfigEntry(name: "自定义路径", en: "Custom path to the Option folder", zh: "自定义 Option 文件夹的路径(没事别填)")]
19+
public static readonly string overridePath = "";
20+
1821
[HarmonyPrefix]
1922
[HarmonyPatch(typeof(AppImage), "OptionMountRootPath", MethodType.Getter)]
2023
public static bool AppImageOptionMountRootPath(ref string __result)
2124
{
22-
__result = Application.streamingAssetsPath;
25+
__result = string.IsNullOrWhiteSpace(overridePath) ? Application.streamingAssetsPath : overridePath;
2326

2427
return false;
2528
}
26-
29+
2730
// 如果 optDir 也是 A 开头的话,结果会重复,需要去重
2831
[HarmonyPostfix]
2932
[HarmonyPatch(typeof(DataManager), "GetDirs")]

0 commit comments

Comments
 (0)