diff --git a/VPet-Simulator.Windows/Function/CoreMOD.cs b/VPet-Simulator.Windows/Function/CoreMOD.cs index 1ab3d2d..8ebafeb 100644 --- a/VPet-Simulator.Windows/Function/CoreMOD.cs +++ b/VPet-Simulator.Windows/Function/CoreMOD.cs @@ -2,6 +2,7 @@ using LinePutScript.Converter; using LinePutScript.Dictionary; using LinePutScript.Localization.WPF; +using NAudio.SoundFont; using System; using System.Collections.Generic; using System.Diagnostics; @@ -48,7 +49,7 @@ namespace VPet_Simulator.Windows public bool SuccessLoad = true; public DateTime CacheDate; public string ErrorMessage; - public static string INTtoVER(int ver) => $"{ver / 100}.{ver % 100:00}"; + public static string INTtoVER(int ver) => ver < 10000 ? $"{ver / 100}.{ver % 100:00}" : $"{ver / 10000}.{ver % 10000 / 100}.{ver % 100:00}"; public static void LoadImage(MainWindow mw, DirectoryInfo di) { //加载其他放在文件夹的图片 diff --git a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs index 23846d5..8ffc1a4 100644 --- a/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winBetterBuy.xaml.cs @@ -1,5 +1,4 @@ -using IWshRuntimeLibrary; -using LinePutScript; +using LinePutScript; using LinePutScript.Localization.WPF; using Panuon.WPF; using Panuon.WPF.UI; diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs index e084d34..c896b67 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs @@ -20,6 +20,8 @@ using System.Windows.Media.Imaging; using System.Windows.Threading; using VPet_Simulator.Core; using VPet_Simulator.Windows.Interface; +using static VPet_Simulator.Windows.Win32; +using System.Runtime.InteropServices; namespace VPet_Simulator.Windows { @@ -351,7 +353,7 @@ namespace VPet_Simulator.Windows ImageMOD.Source = ImageResources.NewSafeBitmapImage(@"pack://application:,,,/Res/TopLogo2019.PNG"); if (mod.GameVer < mw.version) { - if (mod.GameVer / 10 == mw.version / 10) + if (mod.GameVer / 1000 == mw.version / 1000) { runMODGameVer.Text += " (兼容)".Translate(); } @@ -363,7 +365,7 @@ namespace VPet_Simulator.Windows } else if (mod.GameVer > mw.version) { - if (mod.GameVer / 10 == mw.version / 10) + if (mod.GameVer / 1000 == mw.version / 1000) { runMODGameVer.Text += " (兼容)".Translate(); runMODGameVer.Foreground = Function.ResourcesBrush(Function.BrushType.PrimaryText); @@ -895,6 +897,7 @@ namespace VPet_Simulator.Windows return; mw.Main.SetMoveMode(mw.Set.AllowMove, mw.Set.SmartMove, mw.Set.SmartMoveInterval * 1000); } + public void GenStartUP() { mw.Set["v"][(gbol)"newverstartup"] = true; @@ -903,22 +906,22 @@ namespace VPet_Simulator.Windows { if (File.Exists(path)) File.Delete(path); - IWshRuntimeLibrary.WshShell shell = new IWshRuntimeLibrary.WshShell(); - IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(path); + var link = (IShellLink)new ShellLink(); if (mw.Set.StartUPBootSteam) { - shortcut.TargetPath = ExtensionValue.BaseDirectory + @"\VPet.Solution.exe"; - shortcut.Arguments = "launchsteam"; + link.SetPath(ExtensionValue.BaseDirectory + @"\VPet.Solution.exe"); + link.SetArguments("launchsteam"); } else - shortcut.TargetPath = System.Reflection.Assembly.GetExecutingAssembly().Location; + link.SetPath(System.Reflection.Assembly.GetExecutingAssembly().Location); - shortcut.Description = "VPet Simulator"; - shortcut.WorkingDirectory = ExtensionValue.BaseDirectory; - shortcut.IconLocation = ExtensionValue.BaseDirectory + @"vpeticon.ico"; + link.SetDescription("VPet Simulator"); + link.SetPath(ExtensionValue.BaseDirectory); + link.SetIconLocation(ExtensionValue.BaseDirectory + @"vpeticon.ico", 0); try { - shortcut.Save(); + var file = (IPersistFile)link; + file.Save(path, false); } catch { diff --git a/VPet-Simulator.Windows/mod/0000_core/info.lps b/VPet-Simulator.Windows/mod/0000_core/info.lps index 92c4800..5afa4e2 100644 --- a/VPet-Simulator.Windows/mod/0000_core/info.lps +++ b/VPet-Simulator.Windows/mod/0000_core/info.lps @@ -1,4 +1,4 @@ -vupmod#Core:|author#LorisYounger:|gamever#100:|ver#100:| +vupmod#Core:|author#LorisYounger:|gamever#11000:|ver#11000:| intro#这是虚拟桌宠模拟器的核心运行文件/com可以参考此文件编写mod:| authorid#253101309:| itemid#1:|