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/Tutorial.md b/Tutorial.md
index f0c87f4..4f81054 100644
--- a/Tutorial.md
+++ b/Tutorial.md
@@ -8,7 +8,7 @@
## 11/24 更新 捏脸
-捏脸动画为2023年的[steam大奖提名活动](https://store.steampowered.com/news/app/1920960/view/6966567177514898075)奖励, 我们将参加轻松惬意大奖的提名,制作组期待喜欢《虚拟桌宠模拟器》各位主人们可以对我们提出[宝贵的一票](https://store.steampowered.com/news/app/1920960/view/6966567177514898075)。
+捏脸动画为2023年的steam大奖提名活动奖励
长按脸部捏脸
diff --git a/Tutorial_en.md b/Tutorial_en.md
index 6bf6d79..f4cf0d3 100644
--- a/Tutorial_en.md
+++ b/Tutorial_en.md
@@ -9,7 +9,7 @@ The core gameplay revolves taking care of your Pet. However, more automatic acti
## 11/24 Update Pinch Face
-Pinch animation for 2023 [steam award](https://store.steampowered.com/news/app/1920960/view/6966567177514898075) Voting Rewards, we participate in the nomination of the relaxation award. The production team is looking forward to the owners who like VPet Simulator to give us [valuable votes](https://store.steampowered.com/news/app/1920960/view/6966567177514898075)
+Pinch animation for 2023 steam award Voting Rewards
Long press on the face to pinch the face
diff --git a/Tutorial_zht.md b/Tutorial_zht.md
index c4e4249..3eb469d 100644
--- a/Tutorial_zht.md
+++ b/Tutorial_zht.md
@@ -9,7 +9,7 @@
本遊戲的核心是桌面寵物,更多自動行為如亂走亂動、發呆、蹲下等,需要掛機才能看見。
## 11/24 更新捏臉
-捏臉動畫為2023年的[steam大獎提名活動]( https://store.steampowered.com/news/app/1920960/view/6966567177514898075 )獎勵,我們參加輕鬆愜意大獎的提名,製作組期待喜歡《虛擬桌寵模擬器》各位主人們可以對我們提出[寶貴的一票]( https://store.steampowered.com/news/app/1920960/view/6966567177514898075 )。
+捏臉動畫為2023年的steam大獎提名活動
長按臉部捏臉
![ss33](Tutorial.assets/ss33.gif)
diff --git a/VPet-Simulator.Core/Display/Main.xaml.cs b/VPet-Simulator.Core/Display/Main.xaml.cs
index fd24f4a..392c602 100644
--- a/VPet-Simulator.Core/Display/Main.xaml.cs
+++ b/VPet-Simulator.Core/Display/Main.xaml.cs
@@ -381,6 +381,9 @@ namespace VPet_Simulator.Core
private DateTime wavespan;
private void MainGrid_MouseWave(object sender, MouseEventArgs e)
{
+ if(e.LeftButton == MouseButtonState.Pressed)
+ return;
+ isPress = false;
if (rasetype >= 0 || State != WorkingState.Nomal)
return;
diff --git a/VPet-Simulator.Core/Display/MainDisplay.cs b/VPet-Simulator.Core/Display/MainDisplay.cs
index 958566a..752427e 100644
--- a/VPet-Simulator.Core/Display/MainDisplay.cs
+++ b/VPet-Simulator.Core/Display/MainDisplay.cs
@@ -377,6 +377,7 @@ namespace VPet_Simulator.Core
break;
case -1:
rasetype = int.MinValue;
+ Core.Controller.RePostionActive = !Core.Controller.CheckPosition();
if (string.IsNullOrEmpty(name))
Display(GraphType.Raised_Static, AnimatType.C_End, DisplayToNomal);
else
diff --git a/VPet-Simulator.Core/Graph/GraphHelper.cs b/VPet-Simulator.Core/Graph/GraphHelper.cs
index 35ce6af..7f60711 100644
--- a/VPet-Simulator.Core/Graph/GraphHelper.cs
+++ b/VPet-Simulator.Core/Graph/GraphHelper.cs
@@ -485,8 +485,7 @@ namespace VPet_Simulator.Core
return;
}
}
- m.MoveTimer.Enabled = false;
- m.Display(Graph, AnimatType.C_End, m.DisplayToNomal);
+ StopMoving(m);
return;
}
//不是:继续右边走or停下
@@ -504,6 +503,14 @@ namespace VPet_Simulator.Core
return;
}
}
+ StopMoving(m);
+ }
+
+ private void StopMoving(Main m)
+ {
+ if (m.Core.Controller.RePostionActive)
+ m.Core.Controller.ResetPosition();
+ m.Core.Controller.RePostionActive = !m.Core.Controller.CheckPosition();
m.MoveTimer.Enabled = false;
m.Display(Graph, AnimatType.C_End, m.DisplayToNomal);
}
diff --git a/VPet-Simulator.Core/Handle/IController.cs b/VPet-Simulator.Core/Handle/IController.cs
index 2456661..9ec7a29 100644
--- a/VPet-Simulator.Core/Handle/IController.cs
+++ b/VPet-Simulator.Core/Handle/IController.cs
@@ -49,6 +49,16 @@
/// 显示面板窗体
///
void ShowPanel();
+
+ ///
+ /// 在边缘时重新靠边,防止被阻挡
+ ///
+ void ResetPosition();
+ ///
+ /// 判断桌宠是否靠边
+ ///
+ bool CheckPosition();
+
///
/// 启用计算等数据功能
///
@@ -56,6 +66,11 @@
///
/// 互动周期
///
- int InteractionCycle { get; }
+ int InteractionCycle { get; }
+
+ ///
+ /// 是否启用边缘重新定位
+ ///
+ bool RePostionActive { get; set; }
}
}
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/Function/MWController.cs b/VPet-Simulator.Windows/Function/MWController.cs
index 939ab50..bba350b 100644
--- a/VPet-Simulator.Windows/Function/MWController.cs
+++ b/VPet-Simulator.Windows/Function/MWController.cs
@@ -107,6 +107,37 @@ namespace VPet_Simulator.Windows
panelWindow.Show();
}
+ public void ResetPosition()
+ {
+ mw.Dispatcher.Invoke(() =>
+ {
+ if (GetWindowsDistanceUp() < -0.25 * mw.Height && GetWindowsDistanceDown() < System.Windows.SystemParameters.PrimaryScreenHeight)
+ {
+ MoveWindows(0, -GetWindowsDistanceUp() / ZoomRatio);
+ }
+ else if (GetWindowsDistanceDown() < -0.25 * mw.Height && GetWindowsDistanceUp() < System.Windows.SystemParameters.PrimaryScreenHeight)
+ {
+ MoveWindows(0, GetWindowsDistanceDown() / ZoomRatio);
+ }
+ if (GetWindowsDistanceLeft() < -0.25 * mw.Width && GetWindowsDistanceRight() < System.Windows.SystemParameters.PrimaryScreenWidth)
+ {
+ MoveWindows(-GetWindowsDistanceLeft() / ZoomRatio, 0);
+ }
+ else if (GetWindowsDistanceRight() < -0.25 * mw.Width && GetWindowsDistanceLeft() < System.Windows.SystemParameters.PrimaryScreenWidth)
+ {
+ MoveWindows(GetWindowsDistanceRight() / ZoomRatio, 0);
+ }
+ });
+ }
+ public bool CheckPosition() => mw.Dispatcher.Invoke(() =>
+ GetWindowsDistanceUp() < -0.25 * mw.Height && GetWindowsDistanceDown() < System.Windows.SystemParameters.PrimaryScreenHeight
+ || GetWindowsDistanceDown() < -0.25 * mw.Height && GetWindowsDistanceUp() < System.Windows.SystemParameters.PrimaryScreenHeight
+ || GetWindowsDistanceLeft() < -0.25 * mw.Width && GetWindowsDistanceRight() < System.Windows.SystemParameters.PrimaryScreenWidth
+ || GetWindowsDistanceRight() < -0.25 * mw.Width && GetWindowsDistanceLeft() < System.Windows.SystemParameters.PrimaryScreenWidth
+ );
+
+ public bool RePostionActive { get; set; } = true;
+
public double ZoomRatio => mw.Set.ZoomLevel;
public int PressLength => mw.Set.PressLength;
diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs
index 2053fd3..8ba2107 100644
--- a/VPet-Simulator.Windows/MainWindow.cs
+++ b/VPet-Simulator.Windows/MainWindow.cs
@@ -1346,11 +1346,11 @@ namespace VPet_Simulator.Windows
//ClickTexts.Add(new ClickText("有建议/游玩反馈? 来 菜单-系统-反馈中心 反馈吧"));
ClickTexts.Add(new ClickText("长按脑袋拖动桌宠到你喜欢的任意位置"));
- //临时聊天内容
- ClickTexts.Add(new ClickText("主人,sbema秋季促销开始了哦,还有游戏大奖赛,快去给{name}去投一票吧。"));
- ClickTexts.Add(new ClickText("主人主人,{name}参加了sbeam大奖赛哦,给人家投一票喵"));
- ClickTexts.Add(new ClickText("那个。。主人。。\n人家参加了sbeam大奖赛哦。能不能。。给{name}投一票呢~"));
- ClickTexts.Add(new ClickText("电脑里有一款《虚拟桌宠模拟器》的游戏正在参加2023的sbeam大奖赛,快来给桌宠投一票吧"));
+ ////临时聊天内容
+ //ClickTexts.Add(new ClickText("主人,sbema秋季促销开始了哦,还有游戏大奖赛,快去给{name}去投一票吧。"));
+ //ClickTexts.Add(new ClickText("主人主人,{name}参加了sbeam大奖赛哦,给人家投一票喵"));
+ //ClickTexts.Add(new ClickText("那个。。主人。。\n人家参加了sbeam大奖赛哦。能不能。。给{name}投一票呢~"));
+ //ClickTexts.Add(new ClickText("电脑里有一款《虚拟桌宠模拟器》的游戏正在参加2023的sbeam大奖赛,快来给桌宠投一票吧"));
//"如果你觉得目前功能太少,那就多挂会机. 宠物会自己动的".Translate(),
//"你知道吗? 你可以在设置里面修改游戏的缩放比例".Translate(),
//"你现在乱点说话是说话系统的一部分,不过还没做,在做了在做了ing".Translate(),
@@ -1695,7 +1695,7 @@ namespace VPet_Simulator.Windows
SetTransparentHitThrough();
}
- if (File.Exists(ExtensionValue.BaseDirectory + @"\Tutorial.html") && Set["SingleTips"].GetDateTime("tutorial") <= new DateTime(2023, 10, 20))
+ if (File.Exists(ExtensionValue.BaseDirectory + @"\Tutorial.html") && Set["SingleTips"].GetDateTime("tutorial") <= new DateTime(2023, 10, 20) && App.MainWindows.Count == 1)
{
Set["SingleTips"].SetDateTime("tutorial", DateTime.Now);
if (LocalizeCore.CurrentCulture == "zh-Hans")
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