v1.5.7.0 (Summer Update)

This commit is contained in:
Regalis11
2024-06-18 16:49:51 +03:00
parent 4a63dacbce
commit 230d1b6e78
263 changed files with 7792 additions and 2845 deletions
@@ -6,7 +6,7 @@ using Barotrauma.Networking;
namespace Barotrauma.Items.Components
{
partial class Engine : Powered, IServerSerializable, IClientSerializable
partial class Engine : Powered, IServerSerializable, IClientSerializable, IDeteriorateUnderStress
{
private float force;
@@ -76,10 +76,7 @@ namespace Barotrauma.Items.Components
set { force = MathHelper.Clamp(value, -100.0f, 100.0f); }
}
public float CurrentVolume
{
get { return Math.Abs((force / 100.0f) * (MinVoltage <= 0.0f ? 1.0f : Math.Min(prevVoltage, 1.0f))); }
}
public float CurrentVolume => CurrentStress;
public float CurrentBrokenVolume
{
@@ -90,6 +87,8 @@ namespace Barotrauma.Items.Components
}
}
public float CurrentStress => Math.Abs((force / 100.0f) * (MinVoltage <= 0.0f ? 1.0f : Math.Min(prevVoltage, 1.0f)));
private const float TinkeringForceIncrease = 1.5f;
public Engine(Item item, ContentXElement element)