(d404aba3e) Added background color to keybind inputs in the Controls settings layout, to help readability

This commit is contained in:
Joonas Rikkonen
2019-04-03 16:24:06 +03:00
parent c9ad39da08
commit 516159fe43
7 changed files with 33 additions and 30 deletions
@@ -1898,7 +1898,7 @@ namespace Barotrauma
//cannot be protected from pressure when below crush depth
protectedFromPressure = protectedFromPressure && WorldPosition.Y > CharacterHealth.CrushDepth;
//implode if not protected from pressure, and either outside or in a high-pressure hull
if (!protectedFromPressure &&
if (!protectedFromPressure &&
(AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure >= 80.0f))
{
if (CharacterHealth.PressureKillDelay <= 0.0f)
@@ -1913,7 +1913,7 @@ namespace Barotrauma
if (PressureTimer >= 100.0f)
{
if (Controlled == this) { cam.Zoom = 5.0f; }
if (Controlled == this) cam.Zoom = 5.0f;
if (GameMain.NetworkMember == null || !GameMain.NetworkMember.IsClient)
{
Implode();
@@ -103,7 +103,6 @@ namespace Barotrauma
}
public float CrushDepth { get; private set; }
public float PressureKillDelay { get; private set; } = 5.0f;
public float Vitality { get; private set; }
@@ -26,10 +26,6 @@ namespace Barotrauma.Items.Components
private float blinkTimer;
private bool itemLoaded;
private float blinkTimer;
public PhysicsBody ParentBody;
[Editable(MinValueFloat = 0.0f, MaxValueFloat = 2048.0f), Serialize(100.0f, true)]
@@ -1208,9 +1208,9 @@ namespace Barotrauma
public List<T> GetConnectedComponents<T>(bool recursive = false) where T : ItemComponent
{
List<T> connectedComponents = new List<T>();
base.FlipY(relativeToSub);
if (recursive)
if (Prefab.CanSpriteFlipY)
{
List<Item> alreadySearched = new List<Item>() { this };
GetConnectedComponentsRecursive(alreadySearched, connectedComponents);
@@ -646,6 +646,7 @@ namespace Barotrauma
/// </summary>
public void ApplyForce(Vector2 force, float maxVelocity)
{
if (!IsValidValue(force, "force", -1e10f, 1e10f)) return;
if (!IsValidValue(maxVelocity, "max velocity")) return;
Vector2 velocityAddition = force / Mass * (float)Timing.Step;
@@ -656,10 +657,7 @@ namespace Barotrauma
{
newVelocity = newVelocity.ClampLength(maxVelocity);
}
Vector2 clampedForce = (newVelocity - body.LinearVelocity) * Mass / (float)Timing.Step;
if (!IsValidValue(force, "clamped force", -1e10f, 1e10f)) return;
body.ApplyForce(force);
body.ApplyForce((newVelocity - body.LinearVelocity) * Mass / (float)Timing.Step);
}
public void ApplyForce(Vector2 force, Vector2 point)