diff --git a/VPet-Simulator.Core/VPet-Simulator.Core.csproj b/VPet-Simulator.Core/VPet-Simulator.Core.csproj index a4512d5761ce58d04eb02d12796214d4b7822929..731f2a80fce7aa72ab81afab69e1155eeef05b78 100644 --- a/VPet-Simulator.Core/VPet-Simulator.Core.csproj +++ b/VPet-Simulator.Core/VPet-Simulator.Core.csproj @@ -72,16 +72,16 @@ - ..\packages\LinePutScript.1.8.3\lib\net462\LinePutScript.dll + ..\packages\LinePutScript.1.9.2\lib\net462\LinePutScript.dll ..\packages\LinePutScript.Localization.WPF.1.0.6\lib\net462\LinePutScript.Localization.WPF.dll - - ..\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll + + ..\packages\Panuon.WPF.1.0.2\lib\net462\Panuon.WPF.dll - - ..\packages\Panuon.WPF.UI.1.1.15\lib\net462\Panuon.WPF.UI.dll + + ..\packages\Panuon.WPF.UI.1.1.15.3\lib\net462\Panuon.WPF.UI.dll diff --git a/VPet-Simulator.Core/packages.config b/VPet-Simulator.Core/packages.config index 8237a5c3f7efffd703bc545f785ca2c1a76b64b2..36b6e5182d45f9d57f010bf5bd23210ef2da469a 100644 --- a/VPet-Simulator.Core/packages.config +++ b/VPet-Simulator.Core/packages.config @@ -1,7 +1,7 @@  - + - - + + \ No newline at end of file diff --git a/VPet-Simulator.Windows.Interface/VPet-Simulator.Windows.Interface.csproj b/VPet-Simulator.Windows.Interface/VPet-Simulator.Windows.Interface.csproj index 09c36b8db5d32d8118fbce835f2e217a2052348c..93e92da34c616640f7f6028b969984fa651a4edd 100644 --- a/VPet-Simulator.Windows.Interface/VPet-Simulator.Windows.Interface.csproj +++ b/VPet-Simulator.Windows.Interface/VPet-Simulator.Windows.Interface.csproj @@ -90,16 +90,16 @@ - ..\packages\LinePutScript.1.8.3\lib\net462\LinePutScript.dll + ..\packages\LinePutScript.1.9.2\lib\net462\LinePutScript.dll ..\packages\LinePutScript.Localization.WPF.1.0.6\lib\net462\LinePutScript.Localization.WPF.dll - - ..\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll + + ..\packages\Panuon.WPF.1.0.2\lib\net462\Panuon.WPF.dll - - ..\packages\Panuon.WPF.UI.1.1.15\lib\net462\Panuon.WPF.UI.dll + + ..\packages\Panuon.WPF.UI.1.1.15.3\lib\net462\Panuon.WPF.UI.dll diff --git a/VPet-Simulator.Windows.Interface/packages.config b/VPet-Simulator.Windows.Interface/packages.config index 8237a5c3f7efffd703bc545f785ca2c1a76b64b2..36b6e5182d45f9d57f010bf5bd23210ef2da469a 100644 --- a/VPet-Simulator.Windows.Interface/packages.config +++ b/VPet-Simulator.Windows.Interface/packages.config @@ -1,7 +1,7 @@  - + - - + + \ No newline at end of file diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 4de521576b9a2418f8947bafd80b084ddc8f6237..12bd9aaec2a3b66c9e534ef5a150d68acbc5a94f 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -104,8 +104,7 @@ namespace VPet_Simulator.Windows var l = Core.Save.ToLine(); if (HashCheck) { - int hs = l.GetHashCode(); - l[(gint)"hash"] = hs; + l[(gi64)"hash"] = new Line(l.ToString()).GetLongHashCode(); } else l[(gint)"hash"] = -1; @@ -387,10 +386,10 @@ namespace VPet_Simulator.Windows public void GameLoad(ILine line) { Core.Save = GameSave.Load(line); - int hash = line.GetInt("hash"); + long hash = line.GetInt64("hash"); if (line.Remove("hash")) { - HashCheck = line.GetHashCode() == hash; + HashCheck = line.GetLongHashCode() == hash; } } } diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index bbe93b97ef97dc50f203c1070726734722f1f910..77b9922992d01417337191d104953bc2ef38fe81 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -271,6 +271,21 @@ namespace VPet_Simulator.Windows rndtext.Add("关注 {0} 谢谢喵".Translate(Environment.UserName)); } + //旧版本设置兼容 + var cgpteb = Set["CGPT"].Find("enable"); + if (cgpteb != null) + { + if (Set["CGPT"][(gbol)"enable"]) + { + Set["CGPT"][(gstr)"type"] = "API"; + } + else + { + Set["CGPT"][(gstr)"type"] = "LB"; + } + Set["CGPT"].Remove(cgpteb); + } + Dispatcher.Invoke(new Action(() => { LoadingText.Content = "尝试加载动画和生成缓存".Translate(); @@ -282,16 +297,22 @@ namespace VPet_Simulator.Windows winBetterBuy = new winBetterBuy(this); Main = new Main(Core) { }; Main.NoFunctionMOD = Set.CalFunState; - if (!Set["CGPT"][(gbol)"enable"] && IsSteamUser) - { - TalkBox = new TalkBox(this); - Main.ToolBar.MainGrid.Children.Add(TalkBox); - } - else if (Set["CGPT"][(gbol)"enable"]) + + switch (Set["CGPT"][(gstr)"type"]) { - TalkBox = new TalkBoxAPI(this); - Main.ToolBar.MainGrid.Children.Add(TalkBox); + case "API": + TalkBox = new TalkBoxAPI(this); + Main.ToolBar.MainGrid.Children.Add(TalkBox); + break; + case "LB": + if (IsSteamUser) + { + TalkBox = new TalkBox(this); + Main.ToolBar.MainGrid.Children.Add(TalkBox); + } + break; } + LoadingText.Content = "正在加载游戏".Translate(); var m = new System.Windows.Controls.MenuItem() { @@ -513,11 +534,11 @@ namespace VPet_Simulator.Windows petHelper?.Close(); Main?.Dispose(); - if(notifyIcon != null) + if (notifyIcon != null) { notifyIcon.Visible = false; notifyIcon.Dispose(); - } + } System.Environment.Exit(0); } diff --git a/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj b/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj index f29e64d5d6b44fc330e78eb62a632a719d953c31..33976fc0230c0ddb27c5751a4a1285067acb47ee 100644 --- a/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj +++ b/VPet-Simulator.Windows/VPet-Simulator.Windows.csproj @@ -98,7 +98,7 @@ ..\packages\Facepunch.Steamworks.2.3.3\lib\net46\Facepunch.Steamworks.Win64.dll - ..\packages\LinePutScript.1.8.3\lib\net462\LinePutScript.dll + ..\packages\LinePutScript.1.9.2\lib\net462\LinePutScript.dll ..\packages\LinePutScript.Localization.WPF.1.0.6\lib\net462\LinePutScript.Localization.WPF.dll @@ -106,11 +106,11 @@ ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - - ..\packages\Panuon.WPF.1.0.1\lib\net462\Panuon.WPF.dll + + ..\packages\Panuon.WPF.1.0.2\lib\net462\Panuon.WPF.dll - - ..\packages\Panuon.WPF.UI.1.1.15\lib\net462\Panuon.WPF.UI.dll + + ..\packages\Panuon.WPF.UI.1.1.15.3\lib\net462\Panuon.WPF.UI.dll diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml index 845306051a6158e07a2ea8070c3db68dc6a24f5e..a3ef92da42c1368a4f3f9ff5060f6428dc383c1a 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml @@ -20,7 +20,7 @@ pu:TabControlHelper.ItemsHoverBackground="{DynamicResource PrimaryLight}" pu:TabControlHelper.ItemsSelectedBackground="{DynamicResource PrimaryDark}" pu:TabControlHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}" - Foreground="{DynamicResource PrimaryText}"> + Foreground="{DynamicResource PrimaryText}" SelectionChanged="MainTab_SelectionChanged"> @@ -291,6 +291,10 @@ + + + + @@ -298,6 +302,12 @@ Content="{ll:Str '使用桌宠开发者\ 提供的免费API'}" ToolTip="{ll:Str 需遵循相关协议法律法规并有聊天字数限制}" GroupName="cgpttype" IsChecked="True" Checked="CGPType_Checked" /> + +