Fixed password box not working, connecting powered items with multiple parallel wires works, velocity/depth indicators on nav, stuff

This commit is contained in:
Regalis
2016-02-18 21:09:10 +02:00
parent 4ad8105cd6
commit cd4e3a3d2a
20 changed files with 182 additions and 82 deletions
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Globalization;
using System.Linq;
namespace Barotrauma.Items.Components
{
@@ -105,13 +106,19 @@ namespace Barotrauma.Items.Components
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
List<Connection> alreadyChecked = new List<Connection>();
List<Connection> connections = item.Connections;
if (connections == null) return;
foreach (Connection c in connections)
{
if (!c.IsPower) continue;
foreach (Connection recipient in c.Recipients)
var recipients = c.Recipients;
foreach (Connection recipient in recipients)
{
if (recipient == null || !c.IsPower) continue;
@@ -123,6 +130,8 @@ namespace Barotrauma.Items.Components
Powered powered = it.GetComponent<Powered>();
if (powered == null) continue;
if (connectedList.Contains(powered)) continue;
PowerTransfer powerTransfer = powered as PowerTransfer;
PowerContainer powerContainer = powered as PowerContainer;
if (powerTransfer != null)
@@ -140,6 +149,8 @@ namespace Barotrauma.Items.Components
{
fullPower += powerContainer.CurrPowerOutput;
}
alreadyChecked.Add(recipient);
}
else
{