Unstable 0.13.3.11

This commit is contained in:
Markus Isberg
2021-04-28 16:10:00 +03:00
parent bf743f1e99
commit 3f324b14e8
18 changed files with 60 additions and 53 deletions
@@ -276,7 +276,16 @@ namespace Barotrauma
{
SteamWorkshopId = SteamManager.GetWorkshopItemIDFromUrl(workshopUrl);
}
GameVersion = new Version(doc.Root.GetAttributeString("gameversion", "0.0.0.0"));
string versionStr = doc.Root.GetAttributeString("gameversion", "0.0.0.0");
try
{
GameVersion = new Version(versionStr);
}
catch
{
DebugConsole.ThrowError($"Invalid version number in content package \"{Name}\" ({versionStr}).");
GameVersion = GameMain.Version;
}
if (doc.Root.Attribute("installtime") != null)
{
InstallTime = ToolBox.Epoch.ToDateTime(doc.Root.GetAttributeUInt("installtime", 0));