diff --git a/.gitignore b/.gitignore
index 6bfc78d..01dfcf8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -352,4 +352,5 @@ MigrationBackup/
*.zip
*.rar
*_PDLC_*
-*_DLC_*
\ No newline at end of file
+*_DLC_*
+VPet-Simulator.Windows/mod/1111_ChatGPTPlus
diff --git a/VPet-Simulator.Windows/Function/CoreMOD.cs b/VPet-Simulator.Windows/Function/CoreMOD.cs
index b3a58d6..180b0a7 100644
--- a/VPet-Simulator.Windows/Function/CoreMOD.cs
+++ b/VPet-Simulator.Windows/Function/CoreMOD.cs
@@ -16,6 +16,11 @@ namespace VPet_Simulator.Windows
{
public class CoreMOD
{
+ ///
+ /// 自动启用MOD名称
+ ///
+ public static readonly string[] OnModDefList = new string[] { "Core", "PCat", "ModMaker" };
+
public static HashSet LoadedDLL { get; } = new HashSet()
{
"Panuon.WPF.dll","steam_api.dll","Panuon.WPF.UI.dll","steam_api64.dll",
@@ -264,7 +269,7 @@ namespace VPet_Simulator.Windows
}
catch (Exception e)
{
- ErrorMessage = e.Message;
+ ErrorMessage = e.Message;
SuccessLoad = false;
}
}
@@ -274,7 +279,7 @@ namespace VPet_Simulator.Windows
}
}
}
- catch(Exception e)
+ catch (Exception e)
{
ErrorMessage = e.Message;
Tag.Add("该模组已损坏");
@@ -338,7 +343,7 @@ namespace VPet_Simulator.Windows
}
public static bool IsOnMod(this Setting t, string ModName)
{
- if (ModName == "Core")
+ if (CoreMOD.OnModDefList.Contains(ModName))
return true;
var line = t.FindLine("onmod");
if (line == null)
diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs
index 9485964..c0687e7 100644
--- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs
+++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs
@@ -547,11 +547,13 @@ namespace VPet_Simulator.Windows
private void ButtonDisEnable_MouseDown(object sender, MouseButtonEventArgs e)
{
- if (mod.Name.ToLower() == "core")
+ if (mod.Name == "Core")
{
MessageBoxX.Show("模组 Core 为<虚拟桌宠模拟器>核心文件,无法停用".Translate(), "停用失败".Translate());
return;
}
+ else if (CoreMOD.OnModDefList.Contains(mod.Name))
+ return;
mw.Set.OnModRemove(mod.Name);
ShowMod(mod.Name);
ButtonRestart.Visibility = Visibility.Visible;
@@ -577,7 +579,7 @@ namespace VPet_Simulator.Windows
MessageBoxX.Show("请先登录Steam后才能上传文件".Translate(), "上传MOD需要Steam登录".Translate(), MessageBoxIcon.Warning);
return;
}
- if (mods.Name.ToLower() == "core")
+ if (CoreMOD.OnModDefList.Contains(mods.Name))
{
MessageBoxX.Show("模组 Core 为<虚拟桌宠模拟器>核心文件,无法发布\n如需发布自定义内容,请复制并更改名称".Translate(), "MOD上传失败".Translate(), MessageBoxIcon.Error);
return;
diff --git a/VPet-Simulator.Windows/mklink.bat b/VPet-Simulator.Windows/mklink.bat
index 0e1dd58..db1ffbd 100644
--- a/VPet-Simulator.Windows/mklink.bat
+++ b/VPet-Simulator.Windows/mklink.bat
@@ -1,9 +1,17 @@
+chcp 65001
mklink /d "%~dp0\bin\x64\Debug\net462\mod" "%~dp0\mod"
+
+echo ^"以下是其他相关MOD的自动链接生成, 若提示错误为正常现象,无需理会"
+echo "The following is the automatic link generation for other related MODs. If an error is prompted, it is a normal phenomenon and should not be ignored"
+
mklink /d "%~dp0\bin\x64\Release\net462\mod" "%~dp0\mod"
mklink /d "%~dp0\mod\0001_ModMaker" "%~dp0\..\..\VPet.ModMaker\0001_ModMaker"
mklink /d "%~dp0\mod\1100_DemoClock" "%~dp0\..\..\VPet.Plugin.Demo\VPet.Plugin.DemoClock\1100_DemoClock"
+mklink /d "%~dp0\mod\1111_ChatGPTPlus" "%~dp0\..\..\VPet.Plugin.ChatGPTPlus\VPet.Plugin.ChatGPTPlus\1111_ChatGPTPlus"
mklink /d "%~dp0\mod\1101_EdgeTTS" "%~dp0\..\..\VPet.Plugin.Demo\VPet.Plugin.EdgeTTS\1101_EdgeTTS"
mklink /d "%~dp0\mod\1110_ChatGPT" "%~dp0\..\..\VPet.Plugin.Demo\VPet.Plugin.ChatGPT\1110_ChatGPT"
+
+
pause
\ No newline at end of file