This commit is contained in:
EvilFactory
2023-10-20 12:20:18 -03:00
10 changed files with 28 additions and 13 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ body:
label: Version label: Version
description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu. description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu.
options: options:
- v1.1.18.0 (Treacherous Tides) - v1.1.18.1 (Treacherous Tides)
- Other - Other
validations: validations:
required: true required: true
@@ -583,7 +583,9 @@ namespace Barotrauma
if (saveFiles == null) if (saveFiles == null)
{ {
saveFiles = SaveUtil.GetSaveFiles(SaveUtil.SaveType.Singleplayer); //we don't need to log errors at this point,
//if any file fails to load the error will get logged when we try to extract the root from the game session doc later in the method
saveFiles = SaveUtil.GetSaveFiles(SaveUtil.SaveType.Singleplayer, logLoadErrors: false);
} }
var leftColumn = new GUILayoutGroup(new RectTransform(new Vector2(0.5f, 1.0f), loadGameContainer.RectTransform), childAnchor: Anchor.TopCenter) var leftColumn = new GUILayoutGroup(new RectTransform(new Vector2(0.5f, 1.0f), loadGameContainer.RectTransform), childAnchor: Anchor.TopCenter)
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>1.1.18.0</Version> <Version>1.1.18.1</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>1.1.18.0</Version> <Version>1.1.18.1</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>1.1.18.0</Version> <Version>1.1.18.1</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>1.1.18.0</Version> <Version>1.1.18.1</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>1.1.18.0</Version> <Version>1.1.18.1</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>1.1.18.0</Version> <Version>1.1.18.1</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright> <Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
@@ -238,7 +238,7 @@ namespace Barotrauma
return folder; return folder;
} }
public static IReadOnlyList<CampaignMode.SaveInfo> GetSaveFiles(SaveType saveType, bool includeInCompatible = true) public static IReadOnlyList<CampaignMode.SaveInfo> GetSaveFiles(SaveType saveType, bool includeInCompatible = true, bool logLoadErrors = true)
{ {
string defaultFolder = saveType == SaveType.Singleplayer ? DefaultSaveFolder : DefaultMultiplayerSaveFolder; string defaultFolder = saveType == SaveType.Singleplayer ? DefaultSaveFolder : DefaultMultiplayerSaveFolder;
if (!Directory.Exists(defaultFolder)) if (!Directory.Exists(defaultFolder))
@@ -273,7 +273,7 @@ namespace Barotrauma
List<CampaignMode.SaveInfo> saveInfos = new List<CampaignMode.SaveInfo>(); List<CampaignMode.SaveInfo> saveInfos = new List<CampaignMode.SaveInfo>();
foreach (string file in files) foreach (string file in files)
{ {
var docRoot = ExtractGameSessionRootElementFromSaveFile(file); var docRoot = ExtractGameSessionRootElementFromSaveFile(file, logLoadErrors);
if (!includeInCompatible && !IsSaveFileCompatible(docRoot)) if (!includeInCompatible && !IsSaveFileCompatible(docRoot))
{ {
continue; continue;
@@ -561,7 +561,7 @@ namespace Barotrauma
/// Extract *only* the root element of the gamesession.xml file in the given save. /// Extract *only* the root element of the gamesession.xml file in the given save.
/// For performance reasons, none of its child elements are returned. /// For performance reasons, none of its child elements are returned.
/// </summary> /// </summary>
public static XElement? ExtractGameSessionRootElementFromSaveFile(string savePath) public static XElement? ExtractGameSessionRootElementFromSaveFile(string savePath, bool logLoadErrors = true)
{ {
const int maxRetries = 4; const int maxRetries = 4;
for (int i = 0; i <= maxRetries; i++) for (int i = 0; i <= maxRetries; i++)
@@ -617,12 +617,19 @@ namespace Barotrauma
if (i >= maxRetries || !File.Exists(savePath)) { throw; } if (i >= maxRetries || !File.Exists(savePath)) { throw; }
DebugConsole.NewMessage( DebugConsole.NewMessage(
$"Failed to decompress file \"{savePath}\" for root extraction {{{e.Message}}}, retrying in 250 ms...", $"Failed to decompress file \"{savePath}\" for root extraction ({e.Message}), retrying in 250 ms...",
Color.Red); Color.Red);
Thread.Sleep(250); Thread.Sleep(250);
} }
catch (System.IO.InvalidDataException e)
{
if (logLoadErrors)
{
DebugConsole.ThrowError($"Failed to decompress file \"{savePath}\" for root extraction.", e);
}
return null;
}
} }
return null; return null;
} }
@@ -1,3 +1,9 @@
-------------------------------------------------------------------------------------------------------------------------------------------------
v1.1.18.1
-------------------------------------------------------------------------------------------------------------------------------------------------
- Fixed opening the "load game" menu crashing the game if you have any corrupted/unloadable saves in the save folder. In multiplayer, this would just prevent opening the campaign setup menu without any error messages.
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------
v1.1.18.0 v1.1.18.0
------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------