diff --git a/.github/workflows/aquamai.yaml b/.github/workflows/aquamai.yaml
index b0621210..e63a5800 100644
--- a/.github/workflows/aquamai.yaml
+++ b/.github/workflows/aquamai.yaml
@@ -43,6 +43,7 @@ jobs:
cd Output
mkdir Upload
move AquaMai.dll Upload
+ move AquaMai.BepInEx.dll Upload
move AquaMai.*.toml Upload
- uses: actions/upload-artifact@v4
@@ -53,6 +54,7 @@ jobs:
- name: Upload CI release
if: github.event_name != 'pull_request_target' && github.ref == 'refs/heads/main'
shell: cmd
+ # For MaiChartManager, upload MelonLoader version only.
run: build-assets\Releaser\AquaMaiReleaser.exe "Output\Upload\AquaMai.dll" "${{ env.GIT_DESCRIBE }}"
- name: Send to Telegram
@@ -62,11 +64,13 @@ jobs:
$Form = @{
chat_id = "-1002231087502"
media = @(
- @{ type = "document"; media = "attach://aquamai_main"; caption = "${{ env.GIT_DESCRIBE }}`n${{ github.event.commits[0].message }}" },
+ @{ type = "document"; media = "attach://aquamai_melonloader"; caption = "${{ env.GIT_DESCRIBE }}`n${{ github.event.commits[0].message }}" },
+ @{ type = "document"; media = "attach://aquamai_bepinex" },
@{ type = "document"; media = "attach://aquamai_zh" }
@{ type = "document"; media = "attach://aquamai_en" }
) | ConvertTo-Json
- aquamai_main = Get-Item Output\Upload\AquaMai.dll
+ aquamai_melonloader = Get-Item Output\Upload\AquaMai.dll
+ aquamai_bepinex = Get-Item Output\Upload\AquaMai.BepInEx.dll
aquamai_zh = Get-Item Output\Upload\AquaMai.zh.toml
aquamai_en = Get-Item Output\Upload\AquaMai.en.toml
}
diff --git a/.gitignore b/.gitignore
index 86c03662..3935e1ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -372,5 +372,5 @@ MigrationBackup/
Output
tools
-AquaMai/BuildInfo.g.cs
+AquaMai.Common/BuildInfo.g.cs
.idea
\ No newline at end of file
diff --git a/AquaMai.BepInEx/AquaMai.BepInEx.csproj b/AquaMai.BepInEx/AquaMai.BepInEx.csproj
new file mode 100644
index 00000000..80c17a52
--- /dev/null
+++ b/AquaMai.BepInEx/AquaMai.BepInEx.csproj
@@ -0,0 +1,60 @@
+
+
+
+ Release
+ AnyCPU
+ Library
+ AquaMai.BepInEx
+ AquaMai.BepInEx
+ net48
+ 512
+ true
+ 12
+ 414
+ $(ProjectDir)../Libs/;$(AssemblySearchPaths)
+ $(ProjectDir)../Output/
+ false
+ false
+ false
+
+
+
+ false
+ None
+ true
+ prompt
+ 4
+ true
+ false
+
+
+
+ DEBUG
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
diff --git a/AquaMai.BepInEx/FodyWeavers.xml b/AquaMai.BepInEx/FodyWeavers.xml
new file mode 100644
index 00000000..f254ee21
--- /dev/null
+++ b/AquaMai.BepInEx/FodyWeavers.xml
@@ -0,0 +1,6 @@
+
+
+
+ AquaMai.Common
+
+
diff --git a/AquaMai.BepInEx/FodyWeavers.xsd b/AquaMai.BepInEx/FodyWeavers.xsd
new file mode 100644
index 00000000..968f9b5e
--- /dev/null
+++ b/AquaMai.BepInEx/FodyWeavers.xsd
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+ A regular expression matching the assembly names to include in merging.
+
+
+
+
+ A regular expression matching the assembly names to exclude from merging.
+
+
+
+
+ A regular expression matching the resource names to include in merging.
+
+
+
+
+ A regular expression matching the resource names to exclude from merging.
+
+
+
+
+ A switch to control whether the imported types are hidden (made private) or keep their visibility unchanged. Default is 'true'
+
+
+
+
+ A string that is used as prefix for the namespace of the imported types.
+
+
+
+
+ A switch to control whether to import the full assemblies or only the referenced types. Default is 'false'
+
+
+
+
+ A switch to enable compacting of the target assembly by skipping properties, events and unused methods. Default is 'false'
+
+
+
+
+
+ A regular expression matching the assembly names to include in merging.
+
+
+
+
+ A regular expression matching the assembly names to exclude from merging.
+
+
+
+
+ A regular expression matching the resource names to include in merging.
+
+
+
+
+ A regular expression matching the resource names to exclude from merging.
+
+
+
+
+ A switch to control whether the imported types are hidden (made private) or keep their visibility unchanged. Default is 'true'
+
+
+
+
+ A string that is used as prefix for the namespace of the imported types.
+
+
+
+
+ A switch to control whether to import the full assemblies or only the referenced types. Default is 'false'
+
+
+
+
+ A switch to enable compacting of the target assembly by skipping properties, events and unused methods. Default is 'false'
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/AquaMai.BepInEx/Plugin.cs b/AquaMai.BepInEx/Plugin.cs
new file mode 100644
index 00000000..e9afbd2c
--- /dev/null
+++ b/AquaMai.BepInEx/Plugin.cs
@@ -0,0 +1,41 @@
+using System.Reflection;
+using AquaMai.Common;
+using BepInEx;
+using BepInEx.Logging;
+
+namespace AquaMai.BepInEx;
+
+[BepInPlugin(PluginName, BuildInfo.Name, BuildInfo.Version)]
+public class Plugin : BaseUnityPlugin
+{
+ public const string PluginName = "net.aquadx.aquamai";
+
+ public readonly static ManualLogSource LogSource = global::BepInEx.Logging.Logger.CreateLogSource(BuildInfo.Name);
+
+ private static bool _isInitialized = false;
+
+ public void Awake()
+ {
+ if (_isInitialized) return;
+ _isInitialized = true;
+
+ var harmony = new HarmonyLib.Harmony(PluginName);
+
+ Common.AquaMai.Bootstrap(new BootstrapOptions
+ {
+ CurrentAssembly = Assembly.GetExecutingAssembly(),
+ Harmony = harmony,
+ MsgStringAction = LogSource.LogMessage,
+ MsgObjectAction = LogSource.LogMessage,
+ ErrorStringAction = LogSource.LogError,
+ ErrorObjectAction = LogSource.LogError,
+ WarningStringAction = LogSource.LogWarning,
+ WarningObjectAction = LogSource.LogWarning,
+ });
+ }
+
+ public void OnGUI()
+ {
+ Common.AquaMai.OnGUI();
+ }
+}
diff --git a/AquaMai.BepInEx/Properties/AssemblyInfo.cs b/AquaMai.BepInEx/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..17aecbae
--- /dev/null
+++ b/AquaMai.BepInEx/Properties/AssemblyInfo.cs
@@ -0,0 +1,11 @@
+using System.Reflection;
+using AquaMai.Common;
+
+[assembly: AssemblyTitle(BuildInfo.Description)]
+[assembly: AssemblyDescription(BuildInfo.Description)]
+[assembly: AssemblyCompany(BuildInfo.Company)]
+[assembly: AssemblyProduct(BuildInfo.Name)]
+[assembly: AssemblyCopyright("Created by " + BuildInfo.Author)]
+[assembly: AssemblyTrademark(BuildInfo.Company)]
+[assembly: AssemblyVersion(BuildInfo.Version)]
+[assembly: AssemblyFileVersion(BuildInfo.GitVersion)]
diff --git a/AquaMai/AquaMai.csproj b/AquaMai.Common/AquaMai.Common.csproj
similarity index 85%
rename from AquaMai/AquaMai.csproj
rename to AquaMai.Common/AquaMai.Common.csproj
index f7886f5b..61506d19 100644
--- a/AquaMai/AquaMai.csproj
+++ b/AquaMai.Common/AquaMai.Common.csproj
@@ -4,9 +4,9 @@
Release
AnyCPU
Library
- AquaMai
- AquaMai
- net472
+ AquaMai.Common
+ AquaMai.Common
+ net48
512
true
12
@@ -33,6 +33,11 @@
+
+
+
+
+
@@ -42,7 +47,6 @@
-
@@ -56,6 +60,9 @@
+
+ MelonLoader.TinyJSON.dll
+
AquaMai.Config.Interfaces.dll
diff --git a/AquaMai.Common/AquaMai.cs b/AquaMai.Common/AquaMai.cs
new file mode 100644
index 00000000..65e81525
--- /dev/null
+++ b/AquaMai.Common/AquaMai.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using HarmonyLib;
+
+namespace AquaMai.Common;
+
+public class BootstrapOptions
+{
+ public required Assembly CurrentAssembly { get; set; }
+ public required Harmony Harmony { get; set; }
+
+ public required Action MsgStringAction { get; set; }
+ public required Action
diff --git a/AquaMai.Core/AquaMai.Core.csproj b/AquaMai.Core/AquaMai.Core.csproj
index 25ce5926..44612e4b 100644
--- a/AquaMai.Core/AquaMai.Core.csproj
+++ b/AquaMai.Core/AquaMai.Core.csproj
@@ -6,7 +6,7 @@
Library
AquaMai.Core
AquaMai.Core
- net472
+ net48
512
true
12
@@ -32,6 +32,7 @@
+
@@ -41,7 +42,6 @@
-
diff --git a/AquaMai.Core/BuildInfo.cs b/AquaMai.Core/BuildInfo.cs
index 2132ea96..422fa0f1 100644
--- a/AquaMai.Core/BuildInfo.cs
+++ b/AquaMai.Core/BuildInfo.cs
@@ -1,4 +1,4 @@
-using MelonLoader;
+using System.Reflection;
namespace AquaMai.Core;
@@ -16,6 +16,6 @@ public static class BuildInfo
public static string BuildDate;
public static string DownloadLink;
- public static MelonAssembly ModAssembly;
+ public static Assembly ModAssembly;
}
diff --git a/AquaMai.Core/ConfigLoader.cs b/AquaMai.Core/ConfigLoader.cs
index e87088fc..41b41122 100644
--- a/AquaMai.Core/ConfigLoader.cs
+++ b/AquaMai.Core/ConfigLoader.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.IO;
using System.Reflection;
-using MelonLoader;
+using AquaMai.Core.Environment;
using AquaMai.Config;
using AquaMai.Config.Interfaces;
using AquaMai.Config.Migration;
diff --git a/AquaMai.Core/Environment/MelonLogger.cs b/AquaMai.Core/Environment/MelonLogger.cs
new file mode 100644
index 00000000..f2ffaf6a
--- /dev/null
+++ b/AquaMai.Core/Environment/MelonLogger.cs
@@ -0,0 +1,43 @@
+using System;
+
+namespace AquaMai.Core.Environment;
+
+public static class MelonLogger
+{
+ public static Action MsgStringAction = null;
+ public static Action MsgObjectAction = null;
+ public static Action ErrorStringAction = null;
+ public static Action ErrorObjectAction = null;
+ public static Action WarningStringAction = null;
+ public static Action WarningObjectAction = null;
+
+ public static void Msg(string message)
+ {
+ MsgStringAction?.Invoke(message);
+ }
+
+ public static void Msg(object message)
+ {
+ MsgObjectAction?.Invoke(message);
+ }
+
+ public static void Error(string message)
+ {
+ ErrorStringAction?.Invoke(message);
+ }
+
+ public static void Error(object message)
+ {
+ ErrorObjectAction?.Invoke(message);
+ }
+
+ public static void Warning(string message)
+ {
+ WarningStringAction?.Invoke(message);
+ }
+
+ public static void Warning(object message)
+ {
+ WarningObjectAction?.Invoke(message);
+ }
+}
diff --git a/AquaMai.Core/Helpers/EnableConditionHelper.cs b/AquaMai.Core/Helpers/EnableConditionHelper.cs
index 475c24ae..9fead8cb 100644
--- a/AquaMai.Core/Helpers/EnableConditionHelper.cs
+++ b/AquaMai.Core/Helpers/EnableConditionHelper.cs
@@ -4,7 +4,7 @@
using AquaMai.Core.Attributes;
using AquaMai.Core.Resources;
using HarmonyLib;
-using MelonLoader;
+using AquaMai.Core.Environment;
namespace AquaMai.Core.Helpers;
diff --git a/AquaMai.Core/Helpers/FileSystem.cs b/AquaMai.Core/Helpers/FileSystem.cs
index 3eab6f0b..f0608148 100644
--- a/AquaMai.Core/Helpers/FileSystem.cs
+++ b/AquaMai.Core/Helpers/FileSystem.cs
@@ -1,4 +1,3 @@
-using System;
using System.IO;
namespace AquaMai.Core.Helpers;
@@ -7,9 +6,9 @@ public static class FileSystem
{
public static string ResolvePath(string path)
{
- var varExpanded = Environment.ExpandEnvironmentVariables(path);
+ var varExpanded = System.Environment.ExpandEnvironmentVariables(path);
return Path.IsPathRooted(varExpanded)
? varExpanded
- : Path.Combine(Environment.CurrentDirectory, varExpanded);
+ : Path.Combine(System.Environment.CurrentDirectory, varExpanded);
}
}
diff --git a/AquaMai.Core/Helpers/KeyListener.cs b/AquaMai.Core/Helpers/KeyListener.cs
index 0215dd4d..2b4c5657 100644
--- a/AquaMai.Core/Helpers/KeyListener.cs
+++ b/AquaMai.Core/Helpers/KeyListener.cs
@@ -5,7 +5,7 @@
using HarmonyLib;
using Main;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using UnityEngine;
namespace AquaMai.Core.Helpers;
diff --git a/AquaMai.Core/Helpers/MessageHelper.cs b/AquaMai.Core/Helpers/MessageHelper.cs
index 6de142da..19e62f29 100644
--- a/AquaMai.Core/Helpers/MessageHelper.cs
+++ b/AquaMai.Core/Helpers/MessageHelper.cs
@@ -1,7 +1,7 @@
using DB;
using HarmonyLib;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using Process;
using UnityEngine;
@@ -39,4 +39,4 @@ public static void ShowMessage(string message, WindowSizeID size = WindowSizeID.
sprite = sprite,
});
}
-}
\ No newline at end of file
+}
diff --git a/AquaMai.Core/Helpers/NetPacketHook.cs b/AquaMai.Core/Helpers/NetPacketHook.cs
index d20640d4..1643e7f4 100644
--- a/AquaMai.Core/Helpers/NetPacketHook.cs
+++ b/AquaMai.Core/Helpers/NetPacketHook.cs
@@ -2,7 +2,7 @@
using System.Text;
using Net;
using Net.Packet;
-using MelonLoader;
+using AquaMai.Core.Environment;
using MelonLoader.TinyJSON;
using HarmonyLib;
using System.IO;
diff --git a/AquaMai.Core/Helpers/Shim.cs b/AquaMai.Core/Helpers/Shim.cs
index 17a90f3d..629bd5d7 100644
--- a/AquaMai.Core/Helpers/Shim.cs
+++ b/AquaMai.Core/Helpers/Shim.cs
@@ -7,7 +7,7 @@
using MAI2.Util;
using Manager;
using Manager.UserDatas;
-using MelonLoader;
+using AquaMai.Core.Environment;
using Net;
using Net.Packet;
using Net.Packet.Mai2;
diff --git a/AquaMai.Core/Startup.cs b/AquaMai.Core/Startup.cs
index b6c5bf85..ba1ddf8b 100644
--- a/AquaMai.Core/Startup.cs
+++ b/AquaMai.Core/Startup.cs
@@ -6,7 +6,7 @@
using AquaMai.Core.Attributes;
using AquaMai.Core.Helpers;
using AquaMai.Core.Resources;
-using MelonLoader;
+using AquaMai.Core.Environment;
using UnityEngine;
namespace AquaMai.Core;
@@ -15,8 +15,8 @@ public class Startup
{
private static HarmonyLib.Harmony _harmony;
- private static bool _hasErrors;
-
+ private static bool _hasErrors;
+
private static bool _uiInit;
private enum ModLifecycleMethod
@@ -203,11 +203,11 @@ public static void Initialize(Assembly modsAssembly, HarmonyLib.Harmony harmony)
}
public static void OnGUI()
- {
- if (!_uiInit)
- {
+ {
+ if (!_uiInit)
+ {
_uiInit = true;
- GuiSizes.SetupStyles();
+ GuiSizes.SetupStyles();
}
}
}
diff --git a/AquaMai.ErrorReport/AquaMai.ErrorReport.csproj b/AquaMai.ErrorReport/AquaMai.ErrorReport.csproj
index b2947ce4..51c489ac 100644
--- a/AquaMai.ErrorReport/AquaMai.ErrorReport.csproj
+++ b/AquaMai.ErrorReport/AquaMai.ErrorReport.csproj
@@ -2,7 +2,7 @@
WinExe
- net472
+ net48
enable
true
enable
@@ -24,7 +24,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
@@ -33,7 +33,4 @@
-
-
-
-
\ No newline at end of file
+
diff --git a/AquaMai.MelonLoader/AquaMai.MelonLoader.csproj b/AquaMai.MelonLoader/AquaMai.MelonLoader.csproj
new file mode 100644
index 00000000..2717711b
--- /dev/null
+++ b/AquaMai.MelonLoader/AquaMai.MelonLoader.csproj
@@ -0,0 +1,58 @@
+
+
+
+ Release
+ AnyCPU
+ Library
+ AquaMai.MelonLoader
+ AquaMai.MelonLoader
+ AquaMai
+ net48
+ 512
+ true
+ 12
+ 414
+ $(ProjectDir)../Libs/;$(AssemblySearchPaths)
+ $(ProjectDir)../Output/
+ false
+ false
+ false
+
+
+
+ false
+ None
+ true
+ prompt
+ 4
+ true
+ false
+
+
+
+ DEBUG
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
diff --git a/AquaMai.MelonLoader/AquaMai.cs b/AquaMai.MelonLoader/AquaMai.cs
new file mode 100644
index 00000000..c98623d0
--- /dev/null
+++ b/AquaMai.MelonLoader/AquaMai.cs
@@ -0,0 +1,27 @@
+using System.Reflection;
+using MelonLoader;
+
+namespace AquaMai.MelonLoader;
+
+public class AquaMai : MelonMod
+{
+ public override void OnInitializeMelon()
+ {
+ Common.AquaMai.Bootstrap(new Common.BootstrapOptions
+ {
+ CurrentAssembly = Assembly.GetExecutingAssembly(),
+ Harmony = HarmonyInstance,
+ MsgStringAction = MelonLogger.Msg,
+ MsgObjectAction = MelonLogger.Msg,
+ ErrorStringAction = MelonLogger.Error,
+ ErrorObjectAction = MelonLogger.Error,
+ WarningStringAction = MelonLogger.Warning,
+ WarningObjectAction = MelonLogger.Warning,
+ });
+ }
+
+ public override void OnGUI()
+ {
+ Common.AquaMai.OnGUI();
+ }
+}
diff --git a/AquaMai.MelonLoader/FodyWeavers.xml b/AquaMai.MelonLoader/FodyWeavers.xml
new file mode 100644
index 00000000..f254ee21
--- /dev/null
+++ b/AquaMai.MelonLoader/FodyWeavers.xml
@@ -0,0 +1,6 @@
+
+
+
+ AquaMai.Common
+
+
diff --git a/AquaMai.MelonLoader/FodyWeavers.xsd b/AquaMai.MelonLoader/FodyWeavers.xsd
new file mode 100644
index 00000000..968f9b5e
--- /dev/null
+++ b/AquaMai.MelonLoader/FodyWeavers.xsd
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+ A regular expression matching the assembly names to include in merging.
+
+
+
+
+ A regular expression matching the assembly names to exclude from merging.
+
+
+
+
+ A regular expression matching the resource names to include in merging.
+
+
+
+
+ A regular expression matching the resource names to exclude from merging.
+
+
+
+
+ A switch to control whether the imported types are hidden (made private) or keep their visibility unchanged. Default is 'true'
+
+
+
+
+ A string that is used as prefix for the namespace of the imported types.
+
+
+
+
+ A switch to control whether to import the full assemblies or only the referenced types. Default is 'false'
+
+
+
+
+ A switch to enable compacting of the target assembly by skipping properties, events and unused methods. Default is 'false'
+
+
+
+
+
+ A regular expression matching the assembly names to include in merging.
+
+
+
+
+ A regular expression matching the assembly names to exclude from merging.
+
+
+
+
+ A regular expression matching the resource names to include in merging.
+
+
+
+
+ A regular expression matching the resource names to exclude from merging.
+
+
+
+
+ A switch to control whether the imported types are hidden (made private) or keep their visibility unchanged. Default is 'true'
+
+
+
+
+ A string that is used as prefix for the namespace of the imported types.
+
+
+
+
+ A switch to control whether to import the full assemblies or only the referenced types. Default is 'false'
+
+
+
+
+ A switch to enable compacting of the target assembly by skipping properties, events and unused methods. Default is 'false'
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/AquaMai.MelonLoader/Properties/AssemblyInfo.cs b/AquaMai.MelonLoader/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..95e31fd9
--- /dev/null
+++ b/AquaMai.MelonLoader/Properties/AssemblyInfo.cs
@@ -0,0 +1,19 @@
+using System.Reflection;
+using AquaMai.Common;
+
+[assembly: AssemblyTitle(BuildInfo.Description)]
+[assembly: AssemblyDescription(BuildInfo.Description)]
+[assembly: AssemblyCompany(BuildInfo.Company)]
+[assembly: AssemblyProduct(BuildInfo.Name)]
+[assembly: AssemblyCopyright("Created by " + BuildInfo.Author)]
+[assembly: AssemblyTrademark(BuildInfo.Company)]
+[assembly: AssemblyVersion(BuildInfo.Version)]
+[assembly: AssemblyFileVersion(BuildInfo.GitVersion)]
+[assembly: MelonLoader.MelonInfo(typeof(AquaMai.MelonLoader.AquaMai), BuildInfo.Name, BuildInfo.GitVersion, BuildInfo.Author, BuildInfo.DownloadLink)]
+[assembly: MelonLoader.MelonColor()]
+[assembly: MelonLoader.HarmonyDontPatchAll]
+
+// Create and Setup a MelonGame Attribute to mark a Melon as Universal or Compatible with specific Games.
+// If no MelonGame Attribute is found or any of the Values for any MelonGame Attribute on the Melon is null or empty it will be assumed the Melon is Universal.
+// Values for MelonGame Attribute can be found in the Game's app.info file or printed at the top of every log directly beneath the Unity version.
+[assembly: MelonLoader.MelonGame(null, null)]
diff --git a/AquaMai.Mods/AquaMai.Mods.csproj b/AquaMai.Mods/AquaMai.Mods.csproj
index 05cc17de..9405b427 100644
--- a/AquaMai.Mods/AquaMai.Mods.csproj
+++ b/AquaMai.Mods/AquaMai.Mods.csproj
@@ -6,7 +6,7 @@
Library
AquaMai.Mods
AquaMai.Mods
- net472
+ net48
512
true
12
@@ -32,6 +32,7 @@
+
@@ -42,7 +43,6 @@
-
@@ -130,11 +130,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
+
diff --git a/AquaMai.Mods/DeprecationWarning.cs b/AquaMai.Mods/DeprecationWarning.cs
index 4afacde8..6f0c8e93 100644
--- a/AquaMai.Mods/DeprecationWarning.cs
+++ b/AquaMai.Mods/DeprecationWarning.cs
@@ -1,4 +1,5 @@
using AquaMai.Config.Attributes;
+using AquaMai.Core.Environment;
namespace AquaMai.Mods;
@@ -23,7 +24,7 @@ public static void OnBeforeAllPatch()
{
if (v1_0_ModKeyMap_TestMode)
{
- MelonLoader.MelonLogger.Warning("ModKeyMap.TestMode has been deprecated (> v1.0). Please use GameSystem.KeyMap.Test instead.");
+ MelonLogger.Warning("ModKeyMap.TestMode has been deprecated (> v1.0). Please use GameSystem.KeyMap.Test instead.");
}
}
}
diff --git a/AquaMai.Mods/Enhancement/ServerAnnouncement.cs b/AquaMai.Mods/Enhancement/ServerAnnouncement.cs
index 20ab399e..5afa16c7 100644
--- a/AquaMai.Mods/Enhancement/ServerAnnouncement.cs
+++ b/AquaMai.Mods/Enhancement/ServerAnnouncement.cs
@@ -6,7 +6,7 @@
using DB;
using HarmonyLib;
using JetBrains.Annotations;
-using MelonLoader;
+using AquaMai.Core.Environment;
using MelonLoader.TinyJSON;
using Process;
using UnityEngine;
@@ -134,4 +134,4 @@ private static void EntryProcessOnStart()
if (_announcement == null || !_announcement.showOnUserLogin) return;
MessageHelper.ShowMessage(_announcement.announcement, title: _announcement.title, sprite: _sprite, size: WindowSizeID.LargeVerticalPostImage);
}
-}
\ No newline at end of file
+}
diff --git a/AquaMai.Mods/Enhancement/ServerNotice.cs b/AquaMai.Mods/Enhancement/ServerNotice.cs
index 8c9b0766..59af62c9 100644
--- a/AquaMai.Mods/Enhancement/ServerNotice.cs
+++ b/AquaMai.Mods/Enhancement/ServerNotice.cs
@@ -3,7 +3,7 @@
using AquaMai.Core.Helpers;
using AquaMai.Mods.Types;
using JetBrains.Annotations;
-using MelonLoader;
+using AquaMai.Core.Environment;
using MelonLoader.TinyJSON;
namespace AquaMai.Mods.Enhancement;
@@ -53,4 +53,4 @@ private static Variant OnNetPacketComplete(string api, Variant request, Variant
MessageHelper.ShowMessage(entry.content, title: entry.title);
return null;
}
-}
\ No newline at end of file
+}
diff --git a/AquaMai.Mods/Enhancement/ServerResources.cs b/AquaMai.Mods/Enhancement/ServerResources.cs
index 67bc2854..fd1e1a91 100644
--- a/AquaMai.Mods/Enhancement/ServerResources.cs
+++ b/AquaMai.Mods/Enhancement/ServerResources.cs
@@ -10,7 +10,7 @@
using AquaMai.Core.Helpers;
using AquaMai.Mods.Types;
using HarmonyLib;
-using MelonLoader;
+using AquaMai.Core.Environment;
using MelonLoader.TinyJSON;
using Monitor;
using Process;
@@ -239,4 +239,4 @@ private static bool VerifySignature(byte[] data, string signatureBase64)
rsa.ImportParameters(param);
return rsa.VerifyData(data, signature, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
}
-}
\ No newline at end of file
+}
diff --git a/AquaMai.Mods/Fancy/CustomButton.cs b/AquaMai.Mods/Fancy/CustomButton.cs
index 2ebb25d5..4ad6281d 100644
--- a/AquaMai.Mods/Fancy/CustomButton.cs
+++ b/AquaMai.Mods/Fancy/CustomButton.cs
@@ -2,7 +2,7 @@
using AquaMai.Core.Helpers;
using HarmonyLib;
using System.Reflection;
-using MelonLoader;
+using AquaMai.Core.Environment;
using UnityEngine;
using System.Collections.Generic;
using System.IO;
@@ -116,4 +116,4 @@ public static void ButtonManagerInitializePostfix(ButtonManager __instance)
}
} catch (Exception e) {MelonLogger.Msg($"[CustomButton] {e}");}
}
-}
\ No newline at end of file
+}
diff --git a/AquaMai.Mods/Fancy/CustomSkins.cs b/AquaMai.Mods/Fancy/CustomSkins.cs
index 46f6f422..c4a41b05 100644
--- a/AquaMai.Mods/Fancy/CustomSkins.cs
+++ b/AquaMai.Mods/Fancy/CustomSkins.cs
@@ -3,7 +3,7 @@
using AquaMai.Config.Attributes;
using AquaMai.Core.Helpers;
using HarmonyLib;
-using MelonLoader;
+using AquaMai.Core.Environment;
using Monitor;
using Monitor.Game;
using Process;
diff --git a/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/CustomNoteTypes.cs b/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/CustomNoteTypes.cs
index 0614c970..9d8c6fb5 100644
--- a/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/CustomNoteTypes.cs
+++ b/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/CustomNoteTypes.cs
@@ -8,7 +8,7 @@
using HarmonyLib;
using MAI2.Util;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using Monitor;
using UnityEngine;
using AquaMai.Mods.Fancy.GamePlay.CustomNoteTypes.Libs;
diff --git a/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/Libs/CustomSlideNoteData.cs b/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/Libs/CustomSlideNoteData.cs
index a7531e8a..92e1d38f 100644
--- a/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/Libs/CustomSlideNoteData.cs
+++ b/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/Libs/CustomSlideNoteData.cs
@@ -2,7 +2,7 @@
using System.Linq;
using DB;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using UnityEngine;
namespace AquaMai.Mods.Fancy.GamePlay.CustomNoteTypes.Libs;
diff --git a/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/Libs/SlideCodeParser.cs b/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/Libs/SlideCodeParser.cs
index 1aaeb7a4..f42cef0d 100644
--- a/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/Libs/SlideCodeParser.cs
+++ b/AquaMai.Mods/Fancy/GamePlay/CustomNoteTypes/Libs/SlideCodeParser.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
-using MelonLoader;
+using AquaMai.Core.Environment;
namespace AquaMai.Mods.Fancy.GamePlay.CustomNoteTypes.Libs;
diff --git a/AquaMai.Mods/Fancy/RandomBgm.cs b/AquaMai.Mods/Fancy/RandomBgm.cs
index bec48456..dda9f018 100644
--- a/AquaMai.Mods/Fancy/RandomBgm.cs
+++ b/AquaMai.Mods/Fancy/RandomBgm.cs
@@ -7,7 +7,7 @@
using Mai2.Mai2Cue;
using MAI2.Util;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
namespace AquaMai.Mods.Fancy;
diff --git a/AquaMai.Mods/Fix/DebugFeature.cs b/AquaMai.Mods/Fix/DebugFeature.cs
index 0005f805..04152446 100644
--- a/AquaMai.Mods/Fix/DebugFeature.cs
+++ b/AquaMai.Mods/Fix/DebugFeature.cs
@@ -5,7 +5,7 @@
using HarmonyLib;
using MAI2.Util;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using Monitor;
using Process;
using UnityEngine;
diff --git a/AquaMai.Mods/Fix/DisableReboot.cs b/AquaMai.Mods/Fix/DisableReboot.cs
index a4fe6316..cf6716c4 100644
--- a/AquaMai.Mods/Fix/DisableReboot.cs
+++ b/AquaMai.Mods/Fix/DisableReboot.cs
@@ -4,7 +4,7 @@
using AquaMai.Core.Attributes;
using HarmonyLib;
using Manager.Operation;
-using MelonLoader;
+using AquaMai.Core.Environment;
namespace AquaMai.Mods.Fix;
diff --git a/AquaMai.Mods/Fix/Stability/FixMissingCharaCrash.cs b/AquaMai.Mods/Fix/Stability/FixMissingCharaCrash.cs
index 916fb1d4..80cadb37 100644
--- a/AquaMai.Mods/Fix/Stability/FixMissingCharaCrash.cs
+++ b/AquaMai.Mods/Fix/Stability/FixMissingCharaCrash.cs
@@ -4,7 +4,7 @@
using HarmonyLib;
using Manager;
using Manager.MaiStudio;
-using MelonLoader;
+using AquaMai.Core.Environment;
using Monitor;
using Process;
using Util;
diff --git a/AquaMai.Mods/Fix/Stability/SanitizeUserData.cs b/AquaMai.Mods/Fix/Stability/SanitizeUserData.cs
index 0ddae205..7056a26d 100644
--- a/AquaMai.Mods/Fix/Stability/SanitizeUserData.cs
+++ b/AquaMai.Mods/Fix/Stability/SanitizeUserData.cs
@@ -6,7 +6,7 @@
using AquaMai.Config.Attributes;
using AquaMai.Core.Helpers;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using MelonLoader.TinyJSON;
using Net.VO.Mai2;
@@ -371,4 +371,4 @@ private static System.Type ResolveEnumType(string enumName)
}
return result;
}
-}
\ No newline at end of file
+}
diff --git a/AquaMai.Mods/GameSettings/TouchSensitivity.cs b/AquaMai.Mods/GameSettings/TouchSensitivity.cs
index 181901cf..ce495965 100644
--- a/AquaMai.Mods/GameSettings/TouchSensitivity.cs
+++ b/AquaMai.Mods/GameSettings/TouchSensitivity.cs
@@ -4,7 +4,7 @@
using HarmonyLib;
using IO;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
namespace AquaMai.Mods.GameSettings;
diff --git a/AquaMai.Mods/GameSystem/AdxHidInput.cs b/AquaMai.Mods/GameSystem/AdxHidInput.cs
index 1ea936cd..585d8465 100644
--- a/AquaMai.Mods/GameSystem/AdxHidInput.cs
+++ b/AquaMai.Mods/GameSystem/AdxHidInput.cs
@@ -7,7 +7,7 @@
using AquaMai.Config.Types;
using HarmonyLib;
using HidLibrary;
-using MelonLoader;
+using AquaMai.Core.Environment;
using UnityEngine;
namespace AquaMai.Mods.GameSystem;
@@ -157,4 +157,4 @@ public static bool Prefix(
return false;
}
}
-}
\ No newline at end of file
+}
diff --git a/AquaMai.Mods/GameSystem/Assets/Fonts.cs b/AquaMai.Mods/GameSystem/Assets/Fonts.cs
index 9204915c..7b737b3f 100644
--- a/AquaMai.Mods/GameSystem/Assets/Fonts.cs
+++ b/AquaMai.Mods/GameSystem/Assets/Fonts.cs
@@ -3,7 +3,7 @@
using AquaMai.Config.Attributes;
using AquaMai.Core.Helpers;
using HarmonyLib;
-using MelonLoader;
+using AquaMai.Core.Environment;
using TMPro;
using UnityEngine;
using UnityEngine.TextCore.LowLevel;
diff --git a/AquaMai.Mods/GameSystem/Assets/LoadLocalImages.cs b/AquaMai.Mods/GameSystem/Assets/LoadLocalImages.cs
index d1585815..f2d0e970 100644
--- a/AquaMai.Mods/GameSystem/Assets/LoadLocalImages.cs
+++ b/AquaMai.Mods/GameSystem/Assets/LoadLocalImages.cs
@@ -7,7 +7,7 @@
using System.Text.RegularExpressions;
using MAI2.Util;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using Monitor;
using AquaMai.Config.Attributes;
using AquaMai.Core.Helpers;
diff --git a/AquaMai.Mods/GameSystem/Assets/MovieLoader.cs b/AquaMai.Mods/GameSystem/Assets/MovieLoader.cs
index 14cc1267..bbe21e15 100644
--- a/AquaMai.Mods/GameSystem/Assets/MovieLoader.cs
+++ b/AquaMai.Mods/GameSystem/Assets/MovieLoader.cs
@@ -7,7 +7,7 @@
using HarmonyLib;
using MAI2.Util;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using Monitor;
using Monitor.Game;
using UnityEngine;
diff --git a/AquaMai.Mods/GameSystem/CustomCameraId.cs b/AquaMai.Mods/GameSystem/CustomCameraId.cs
index 2bddfb54..1b5fcf8b 100644
--- a/AquaMai.Mods/GameSystem/CustomCameraId.cs
+++ b/AquaMai.Mods/GameSystem/CustomCameraId.cs
@@ -4,7 +4,7 @@
using System.Linq;
using HarmonyLib;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using UnityEngine;
using AquaMai.Config.Attributes;
using AquaMai.Core.Helpers;
@@ -151,4 +151,4 @@ public static void OnBeforePatch()
MelonLogger.Msg($"[CustomCameraId] {line}");
}
}
-}
\ No newline at end of file
+}
diff --git a/AquaMai.Mods/GameSystem/DisableTimeout.cs b/AquaMai.Mods/GameSystem/DisableTimeout.cs
index 0b628fac..9005bbde 100644
--- a/AquaMai.Mods/GameSystem/DisableTimeout.cs
+++ b/AquaMai.Mods/GameSystem/DisableTimeout.cs
@@ -4,7 +4,7 @@
using AquaMai.Core.Attributes;
using HarmonyLib;
using Manager;
-using MelonLoader;
+using AquaMai.Core.Environment;
using Monitor;
using Process;
using Process.Entry.State;
@@ -128,4 +128,4 @@ public static void ContinueMonitorPlayContinue(PlayableDirector ____director)
____director.extrapolationMode = DirectorWrapMode.Hold;
}
}
-}
\ No newline at end of file
+}
diff --git a/AquaMai.Mods/GameSystem/KeyMap.cs b/AquaMai.Mods/GameSystem/KeyMap.cs
index 6da8a52d..e8776648 100644
--- a/AquaMai.Mods/GameSystem/KeyMap.cs
+++ b/AquaMai.Mods/GameSystem/KeyMap.cs
@@ -47,7 +47,7 @@ You may want to configure IO4 emulation key mapping in segatools.ini's [io4] and
public static readonly bool disableDebugInput = false; // Implemented in AquaMai.Mods/Fix/Common.cs
[EnableIf(nameof(disableIO4))]
- [HarmonyPatch("IO.Jvs+JvsSwitch", ".ctor", MethodType.Constructor, [typeof(int), typeof(string), typeof(KeyCode), typeof(bool), typeof(bool)])]
+ [HarmonyPatch("IO.Jvs+JvsSwitch, Assembly-CSharp", ".ctor", MethodType.Constructor, [typeof(int), typeof(string), typeof(KeyCode), typeof(bool), typeof(bool)])]
[HarmonyPrefix]
public static void PreJvsSwitchConstructor(ref bool invert)
{
diff --git a/AquaMai.Mods/GameSystem/SinglePlayer.ExteraMouseInput.cs b/AquaMai.Mods/GameSystem/SinglePlayer.ExteraMouseInput.cs
index a1ac9ac2..16318009 100644
--- a/AquaMai.Mods/GameSystem/SinglePlayer.ExteraMouseInput.cs
+++ b/AquaMai.Mods/GameSystem/SinglePlayer.ExteraMouseInput.cs
@@ -1,4 +1,5 @@
using AquaMai.Config.Attributes;
+using AquaMai.Core.Environment;
using HarmonyLib;
using System;
using System.Collections;
@@ -33,7 +34,7 @@ public static void MouseTouchPanelStart(MouseTouchPanel __instance)
{
return;
}
- MelonLoader.MelonLogger.Msg("ExteraMouseInput: Start");
+ MelonLogger.Msg("ExteraMouseInput: Start");
leftCanvas = __instance.transform.parent.GetComponent