diff --git a/Barotrauma/BarotraumaClient/ClientSource/Steam/BulkDownloader.cs b/Barotrauma/BarotraumaClient/ClientSource/Steam/BulkDownloader.cs index d572c3797..da5f50871 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Steam/BulkDownloader.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Steam/BulkDownloader.cs @@ -71,6 +71,7 @@ namespace Barotrauma.Steam return (await Task.WhenAll(outOfDatePackages.Where(p => !p.IsUpToDate) .Select(p => p.Package.UgcId) + .NotNone() .OfType() .Select(async id => await SteamManager.Workshop.GetItem(id.Value)))) .Where(p => p.HasValue).Select(p => p ?? default).ToArray(); diff --git a/Barotrauma/BarotraumaClient/ClientSource/Steam/WorkshopMenu/Mutable/ModListPreset.cs b/Barotrauma/BarotraumaClient/ClientSource/Steam/WorkshopMenu/Mutable/ModListPreset.cs index daec8758f..7a3a9b85d 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Steam/WorkshopMenu/Mutable/ModListPreset.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Steam/WorkshopMenu/Mutable/ModListPreset.cs @@ -113,7 +113,10 @@ namespace Barotrauma { case ModType.Workshop: pkgElem.SetAttributeValue("name", pkg.Name); - pkgElem.SetAttributeValue("id", pkg.UgcId.ToString()); + if (pkg.UgcId.TryUnwrap(out ContentPackageId ugcId)) + { + pkgElem.SetAttributeValue("id", ugcId.ToString()); + } break; case ModType.Local: pkgElem.SetAttributeValue("name", pkg.Name); diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj index 0b3ac96f7..10bc6b9b4 100644 --- a/Barotrauma/BarotraumaClient/LinuxClient.csproj +++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.19.10.0 + 0.19.11.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj index 9ea056a80..7fad64083 100644 --- a/Barotrauma/BarotraumaClient/MacClient.csproj +++ b/Barotrauma/BarotraumaClient/MacClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.19.10.0 + 0.19.11.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj index 7393fedd3..c88fd0394 100644 --- a/Barotrauma/BarotraumaClient/WindowsClient.csproj +++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 0.19.10.0 + 0.19.11.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj index 3d96b842e..91c01c717 100644 --- a/Barotrauma/BarotraumaServer/LinuxServer.csproj +++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.19.10.0 + 0.19.11.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj index e5a49e80b..9ddb35313 100644 --- a/Barotrauma/BarotraumaServer/MacServer.csproj +++ b/Barotrauma/BarotraumaServer/MacServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.19.10.0 + 0.19.11.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj index 4cd759020..4b9035163 100644 --- a/Barotrauma/BarotraumaServer/WindowsServer.csproj +++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 0.19.10.0 + 0.19.11.0 Copyright © FakeFish 2018-2022 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs index e864b0a9e..508032303 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs @@ -269,6 +269,9 @@ namespace Barotrauma public const float DefaultRealWorldCrushDepth = 3500.0f; + /// + /// The crush depth of a non-upgraded submarine in in-game coordinates. Note that this can be above the top of the level! + /// public float CrushDepth { get @@ -277,6 +280,9 @@ namespace Barotrauma } } + /// + /// The crush depth of a non-upgraded submarine in "real world units" (meters from the surface of Europa). Note that this can be above the top of the level! + /// public float RealWorldCrushDepth { get diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/LevelData.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/LevelData.cs index 340238aa7..4120c334a 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/LevelData.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Map/Levels/LevelData.cs @@ -47,6 +47,9 @@ namespace Barotrauma public readonly Point Size; + /// + /// The depth at which the level starts at, in in-game coordinates. E.g. if this was set to 100 000 (= 1000 m), the nav terminal would display the depth as 1000 meters at the top of the level. + /// public readonly int InitialDepth; /// @@ -59,6 +62,9 @@ namespace Barotrauma public bool EventsExhausted { get; set; } + /// + /// The crush depth of a non-upgraded submarine in in-game coordinates. Note that this can be above the top of the level! + /// public float CrushDepth { get @@ -66,6 +72,10 @@ namespace Barotrauma return Math.Max(Size.Y, Level.DefaultRealWorldCrushDepth / Physics.DisplayToRealWorldRatio) - InitialDepth; } } + + /// + /// The crush depth of a non-upgraded submarine in "real world units" (meters from the surface of Europa). Note that this can be above the top of the level! + /// public float RealWorldCrushDepth { get diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/Structure.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/Structure.cs index 600a2b731..36d7e96a5 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Map/Structure.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Map/Structure.cs @@ -1433,6 +1433,13 @@ namespace Barotrauma if (submarine?.Info.GameVersion != null) { SerializableProperty.UpgradeGameVersion(s, s.Prefab.ConfigElement, submarine.Info.GameVersion); + //tier-based upgrade restrictions were added in 0.19.10.0, potentially soft-locking campaigns if you're + //far enough on the map on a submarine that can no longer have as many levels of hull upgrades. + // -> let's ensure that won't happen + if (submarine.Info.GameVersion < new Version(0, 19, 10) && GameMain.GameSession?.LevelData != null) + { + s.CrushDepth = Math.Max(s.CrushDepth, GameMain.GameSession.LevelData.InitialDepth * Physics.DisplayToRealWorldRatio + 500); + } } bool hasDamage = false; diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt index 9632afbbd..8e9e8e7ac 100644 --- a/Barotrauma/BarotraumaShared/changelog.txt +++ b/Barotrauma/BarotraumaShared/changelog.txt @@ -1,3 +1,11 @@ +--------------------------------------------------------------------------------------------------------- +v0.19.11.0 +--------------------------------------------------------------------------------------------------------- + +- Fixed some old campaign saves being impossible to continue due to the new submarine upgrade restricions. +- Fixed "update all mods" button doing nothing in the Workshop menu. +- Fixed inability to create mod lists that include Workshop mods. + --------------------------------------------------------------------------------------------------------- v0.19.10.0 --------------------------------------------------------------------------------------------------------- diff --git a/Deploy/DeployAll.sh b/Deploy/DeployAll.sh old mode 100644 new mode 100755