From da3213bb7760213bcf74ef98f82bd70d1e0b6783 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Fri, 23 Feb 2024 02:46:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20+=E6=94=AF=E6=8C=81ISave?= =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Handle/GameSave.cs | 7 +++++-- VPet-Simulator.Core/Handle/IGameSave.cs | 5 ++++- VPet-Simulator.Windows.Interface/GameSave_v2.cs | 4 ++-- VPet-Simulator.Windows/mklink.bat | 9 +++++---- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/VPet-Simulator.Core/Handle/GameSave.cs b/VPet-Simulator.Core/Handle/GameSave.cs index 531e5c3..2e96b14 100644 --- a/VPet-Simulator.Core/Handle/GameSave.cs +++ b/VPet-Simulator.Core/Handle/GameSave.cs @@ -154,7 +154,7 @@ namespace VPet_Simulator.Core /// /// 变化 心情 /// - public double ChangeFeeling = 0; + public double ChangeFeeling { get; set; } = 0; public void FeelingChange(double value) { ChangeFeeling += value; @@ -174,7 +174,7 @@ namespace VPet_Simulator.Core { get => likability; set { - int max = 90 + Level * 10; + var max = LikabilityMax; value = Math.Max(0, value); if (value > max) { @@ -260,6 +260,9 @@ namespace VPet_Simulator.Core /// [Line(name: "mode")] public ModeType Mode { get; set; } = ModeType.Nomal; + + public double LikabilityMax => 90 + Level * 10; + /// /// 计算宠物当前状态 /// diff --git a/VPet-Simulator.Core/Handle/IGameSave.cs b/VPet-Simulator.Core/Handle/IGameSave.cs index 0bc1709..28390d9 100644 --- a/VPet-Simulator.Core/Handle/IGameSave.cs +++ b/VPet-Simulator.Core/Handle/IGameSave.cs @@ -86,7 +86,10 @@ namespace VPet_Simulator.Core /// 修改心情 /// void FeelingChange(double value); - + /// + /// 变化 心情 + /// + double ChangeFeeling { get; set; } /// /// 心情 /// diff --git a/VPet-Simulator.Windows.Interface/GameSave_v2.cs b/VPet-Simulator.Windows.Interface/GameSave_v2.cs index 0747bfd..e355556 100644 --- a/VPet-Simulator.Windows.Interface/GameSave_v2.cs +++ b/VPet-Simulator.Windows.Interface/GameSave_v2.cs @@ -26,7 +26,7 @@ namespace VPet_Simulator.Windows.Interface /// public GameSave_v2(string petname) { - GameSave = new IGameSave(petname); + GameSave = new GameSave(petname); Statistics = new Statistics(); } protected void load(ILPS lps, Statistics oldStatistics = null, IGameSave oldGameSave = null, ILPS olddata = null) @@ -44,7 +44,7 @@ namespace VPet_Simulator.Windows.Interface long hash; if (vpet != null) { - GameSave = IGameSave.Load(vpet); + GameSave = Core.GameSave.Load(vpet); hash = vpet.GetInt64("hash"); if (vpet.Remove("hash")) { diff --git a/VPet-Simulator.Windows/mklink.bat b/VPet-Simulator.Windows/mklink.bat index 4bb8dce..331bdb1 100644 --- a/VPet-Simulator.Windows/mklink.bat +++ b/VPet-Simulator.Windows/mklink.bat @@ -1,13 +1,14 @@ %1 mshta vbscript:createobject("shell.application").shellexecute("%~s0","::","","runas",1)(window.close)&exit cd /d %~dp0 -mklink /d "%~dp0\bin\x64\Debug\net462\mod" "%~dp0\mod" +mklink /d "%~dp0\bin\x64\Debug\net8.0-windows\mod" "%~dp0\mod" +mklink /d "%~dp0\bin\x64\Debug\net8.0-windows\mod" "%~dp0\mod" echo The following is the automatic link generation for other related MODs. If an error is prompted, it is a normal phenomenon and can be ignored -mklink /d "%~dp0\bin\x86\Debug\net462\mod" "%~dp0\mod" -mklink /d "%~dp0\bin\x64\Release\net462\mod" "%~dp0\mod" -mklink /d "%~dp0\..\VPet.Solution\bin\Debug\mod" "%~dp0\mod" +mklink /d "%~dp0\bin\x86\Debug\net8.0-windows\mod" "%~dp0\mod" +mklink /d "%~dp0\bin\x64\Release\net8.0-windows\mod" "%~dp0\mod" +mklink /d "%~dp0\..\VPet.Solution\bin\Debug\net8.0-windows\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"