更新 +支持ISave 接口

This commit is contained in:
ZouJin 2024-02-23 02:46:09 +08:00
parent 48f1bc88f0
commit da3213bb77
4 changed files with 16 additions and 9 deletions

View File

@ -154,7 +154,7 @@ namespace VPet_Simulator.Core
/// <summary>
/// 变化 心情
/// </summary>
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
/// </summary>
[Line(name: "mode")]
public ModeType Mode { get; set; } = ModeType.Nomal;
public double LikabilityMax => 90 + Level * 10;
/// <summary>
/// 计算宠物当前状态
/// </summary>

View File

@ -86,7 +86,10 @@ namespace VPet_Simulator.Core
/// 修改心情
/// </summary>
void FeelingChange(double value);
/// <summary>
/// 变化 心情
/// </summary>
double ChangeFeeling { get; set; }
/// <summary>
/// 心情
/// </summary>

View File

@ -26,7 +26,7 @@ namespace VPet_Simulator.Windows.Interface
/// </summary>
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"))
{

View File

@ -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"