多开时备份只显示当前游戏存档

This commit is contained in:
ZouJin 2023-10-12 23:06:07 +08:00
parent e773517f0b
commit d81611471f
3 changed files with 5 additions and 6 deletions

View File

@ -969,6 +969,8 @@ namespace VPet_Simulator.Windows
public MainWindow(string prefixsave)
{
PrefixSave = prefixsave;
if (!PrefixSave.StartsWith("-"))
PrefixSave = '-' + prefixsave;
//处理ARGS
Args = new LPS_D();

View File

@ -1,8 +1,7 @@
{
"profiles": {
"VPet-Simulator.Windows": {
"commandName": "Project",
"commandLineArgs": "prefix#test:|"
"commandName": "Project"
}
}
}

View File

@ -1174,7 +1174,7 @@ namespace VPet_Simulator.Windows
if (Directory.Exists(ExtensionValue.BaseDirectory + @"\Saves"))
{
foreach (var file in new DirectoryInfo(ExtensionValue.BaseDirectory + @"\Saves")
.GetFiles("Save*.lps").OrderByDescending(x => x.LastWriteTime))
.GetFiles($"Save{mw.PrefixSave}_*.lps").OrderByDescending(x => x.LastWriteTime))
{
CBSaveReLoad.Items.Add(file.Name.Split('.').First());
}
@ -1361,9 +1361,7 @@ namespace VPet_Simulator.Windows
mw.Core.Save = mw.GameSavesData.GameSave;
if (oldsave.HashCheck) // 对于重开无作弊的玩家保留统计
mw.GameSavesData.Statistics = oldsave.Statistics;
mw.HashCheck = true;
CBSaveReLoad.IsEnabled = false;
BtnSaveReload.IsEnabled = false;
mw.HashCheck = true;
MessageBoxX.Show("重置成功".Translate());
}
}