Build 0.19.11.0

This commit is contained in:
Markus Isberg
2022-10-06 17:13:27 +03:00
parent 91f2f6f4f7
commit 05c7b1f869
13 changed files with 42 additions and 7 deletions
@@ -269,6 +269,9 @@ namespace Barotrauma
public const float DefaultRealWorldCrushDepth = 3500.0f;
/// <summary>
/// The crush depth of a non-upgraded submarine in in-game coordinates. Note that this can be above the top of the level!
/// </summary>
public float CrushDepth
{
get
@@ -277,6 +280,9 @@ namespace Barotrauma
}
}
/// <summary>
/// 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!
/// </summary>
public float RealWorldCrushDepth
{
get
@@ -47,6 +47,9 @@ namespace Barotrauma
public readonly Point Size;
/// <summary>
/// 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.
/// </summary>
public readonly int InitialDepth;
/// <summary>
@@ -59,6 +62,9 @@ namespace Barotrauma
public bool EventsExhausted { get; set; }
/// <summary>
/// The crush depth of a non-upgraded submarine in in-game coordinates. Note that this can be above the top of the level!
/// </summary>
public float CrushDepth
{
get
@@ -66,6 +72,10 @@ namespace Barotrauma
return Math.Max(Size.Y, Level.DefaultRealWorldCrushDepth / Physics.DisplayToRealWorldRatio) - InitialDepth;
}
}
/// <summary>
/// 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!
/// </summary>
public float RealWorldCrushDepth
{
get
@@ -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;