Release 1.11.4.1 (Winter Update)

This commit is contained in:
Markus Isberg
2025-12-08 14:56:47 +00:00
parent 21e34e5cd8
commit 598966f200
121 changed files with 1614 additions and 819 deletions
@@ -66,21 +66,28 @@ namespace Barotrauma
private static readonly string LegacyMultiplayerSaveFolder = Path.Combine(LegacySaveFolder, "Multiplayer");
#if OSX
//"/*user*/Library/Application Support/Daedalic Entertainment GmbH/" on Mac
public static readonly string DefaultSaveFolder = Path.Combine(
/// <summary>
/// These exist because we used to have a workaround here that set the save folder to
/// Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Library", "Application Support", "Daedalic Entertainment GmbH", "Barotrauma")
/// on Mac, because apparently LocalApplicationData returned something different than the expected path. That seems to have changed in .NET8, and now we
/// can use the same LocalApplicationData on all platforms. We however still check the old path in case someone has their saves there.
/// </summary>
public static readonly string LegacyMacSaveFolder = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.Personal),
"Library",
"Application Support",
"Daedalic Entertainment GmbH",
"Barotrauma");
#else
//"C:/Users/*user*/AppData/Local/Daedalic Entertainment GmbH/" on Windows
//"/home/*user*/.local/share/Daedalic Entertainment GmbH/" on Linux
public static string LegacyMacMultiplayerSaveFolder = Path.Combine(LegacyMacSaveFolder, "Multiplayer");
#endif
//C:/Users/*user*/AppData/Local/Daedalic Entertainment GmbH/ on Windows
///home/*user*/.local/share/Daedalic Entertainment GmbH/ on Linux
///Users/*user*/Library/Application Support/Daedalic Entertainment GmbH/ on Mac
public static readonly string DefaultSaveFolder = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Daedalic Entertainment GmbH",
"Barotrauma");
#endif
public static string DefaultMultiplayerSaveFolder = Path.Combine(DefaultSaveFolder, "Multiplayer");
@@ -410,6 +417,13 @@ namespace Barotrauma
files.AddRange(Directory.GetFiles(legacyFolder, "*.save", System.IO.SearchOption.TopDirectoryOnly));
}
#if OSX
string legacyMacFolder = saveType == SaveType.Singleplayer ? LegacyMacSaveFolder : LegacyMacMultiplayerSaveFolder;
if (Directory.Exists(legacyMacFolder))
{
files.AddRange(Directory.GetFiles(legacyMacFolder, "*.save", System.IO.SearchOption.TopDirectoryOnly));
}
#endif
files = files.Distinct().ToList();
List<CampaignMode.SaveInfo> saveInfos = new List<CampaignMode.SaveInfo>();