mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复编译版没有userdata文件夹导致的储存错误
This commit is contained in:
parent
e8a9498a62
commit
a911d9ba34
@ -74,12 +74,14 @@ namespace VPet_Simulator.Windows
|
||||
File.Delete(ds[0]);
|
||||
if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + $"\\UserData\\Save_{st}.lps"))
|
||||
File.Delete(AppDomain.CurrentDomain.BaseDirectory + $"\\UserData\\Save_{st}.lps");
|
||||
if (!Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\UserData"))
|
||||
Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + @"\UserData");
|
||||
if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\Save.lps"))
|
||||
File.Move(AppDomain.CurrentDomain.BaseDirectory + @"\Save.lps", AppDomain.CurrentDomain.BaseDirectory + $"\\UserData\\Save_{st}.lps");
|
||||
if (Core != null && Core.Save != null)
|
||||
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Save.lps", Core.Save.ToLine().ToString());
|
||||
if (CGPTClient != null)
|
||||
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\ChatGPTSetting.json", CGPTClient.Save());
|
||||
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\ChatGPTSetting.json", CGPTClient.Save());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -383,13 +383,13 @@ namespace VPet_Simulator.Windows
|
||||
Main.Say("欢迎使用虚拟桌宠模拟器\n这是个中期的测试版,若有bug请多多包涵\n欢迎加群虚拟主播模拟器430081239或在菜单栏-管理-反馈中提交bug或建议", GraphCore.Helper.SayType.Shining);
|
||||
});
|
||||
}
|
||||
else if (Set["SingleTips"].GetDateTime("update") <= new DateTime(2023, 6, 21))
|
||||
else if (Set["SingleTips"].GetDateTime("update") <= new DateTime(2023, 6, 23))
|
||||
{
|
||||
if (Set["SingleTips"].GetDateTime("update") > new DateTime(2023, 6, 19)) // 上次更新日期时间
|
||||
notifyIcon.ShowBalloonTip(10, "更新通知 06/21", //本次更新内容
|
||||
"添加喝水,口渴,睡觉,肚子饿,喂食,等动画\n新增低状态的说话文本,更新食物图片\n提高了学习收益和降低了学习消耗", ToolTipIcon.Info);
|
||||
if (Set["SingleTips"].GetDateTime("update") > new DateTime(2023, 6, 21)) // 上次更新日期时间
|
||||
notifyIcon.ShowBalloonTip(10, "更新通知 06/23", //本次更新内容
|
||||
"修复空存档储存出错的bug", ToolTipIcon.Info);
|
||||
else// 累计更新内容
|
||||
notifyIcon.ShowBalloonTip(10, "更新通知 06/21",
|
||||
notifyIcon.ShowBalloonTip(10, "更新通知 06/23",
|
||||
"现已支持数据计算,桌宠现在需要进行吃饭喝水等\n更新了新的状态动画文件\n新增自动备份存档功能\n数据计算数据相关优化", ToolTipIcon.Info);
|
||||
Set["SingleTips"].SetDateTime("update", DateTime.Now);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user