diff --git a/Tutorial.md b/Tutorial.md index 30b968f..08c84a0 100644 --- a/Tutorial.md +++ b/Tutorial.md @@ -1,6 +1,6 @@ # 虚拟桌宠模拟器 使用教程 -**本教程仅会在第一次启动/操作更新时自动打开** +**本教程仅会在第一次启动/操作更新时自动打开** *如果你每次启动桌宠都能看到这个文件自动打开,那就是bug,请反馈给我* 桌宠默认会打开[数据计算](#数据计算), 打开数据计算后会计算桌宠心情/食物等消耗,需要玩家进行互动.可在设置中进行设置开关和游玩节奏 diff --git a/VPet-Simulator.Core/Display/MainLogic.cs b/VPet-Simulator.Core/Display/MainLogic.cs index 12d40c5..f54c357 100644 --- a/VPet-Simulator.Core/Display/MainLogic.cs +++ b/VPet-Simulator.Core/Display/MainLogic.cs @@ -236,7 +236,7 @@ namespace VPet_Simulator.Core } } public event Action FunctionSpendHandle; - private void EventTimer_Elapsed(object sender, ElapsedEventArgs e) + public void EventTimer_Elapsed(object sender, ElapsedEventArgs e) { //所有Handle TimeHandle?.Invoke(this); diff --git a/VPet-Simulator.Windows.Interface/Setting.cs b/VPet-Simulator.Windows.Interface/Setting.cs index 8997269..a4beff0 100644 --- a/VPet-Simulator.Windows.Interface/Setting.cs +++ b/VPet-Simulator.Windows.Interface/Setting.cs @@ -2,6 +2,7 @@ using LinePutScript.Dictionary; using System; using System.Windows; +using VPet_Simulator.Core; namespace VPet_Simulator.Windows.Interface { @@ -106,6 +107,14 @@ namespace VPet_Simulator.Windows.Interface // set => this["set"].SetBool("storemem", value); //} /// + /// 非计算模式下默认模式 + /// + public GameSave.ModeType CalFunState + { + get => (GameSave.ModeType)this[(gint)"calfunstate"]; + set => this[(gint)"calfunstate"] = (int)value; + } + /// /// 数据收集频率 /// public int DiagnosisInterval diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 1993fa6..3b45d7c 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -75,9 +75,12 @@ namespace VPet_Simulator.Windows if (Core != null && Core.Save != null) { - var ds = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory + @"\UserData"); - while (ds.Length > Set.BackupSaveMaxNum) + var ds = new List(Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory + @"\UserData")); + while (ds.Count > Set.BackupSaveMaxNum) + { File.Delete(ds[0]); + ds.RemoveAt(0); + } if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + $"\\UserData\\Save_{st}.lps")) File.Delete(AppDomain.CurrentDomain.BaseDirectory + $"\\UserData\\Save_{st}.lps"); diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index ac3587d..ecd2dd2 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -232,6 +232,7 @@ namespace VPet_Simulator.Windows winSetting = new winGameSetting(this); winBetterBuy = new winBetterBuy(this); Main = new Main(Core) { }; + Main.NoFunctionMOD = Set.CalFunState; if (!Set["CGPT"][(gbol)"enable"] && IsSteamUser) { TalkBox = new TalkBox(this); diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml index 43be242..2a27217 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml @@ -218,11 +218,13 @@ - +