v1.6.17.0 (Unto the Breach update)

This commit is contained in:
Regalis11
2024-10-22 17:29:04 +03:00
parent e74b3cdb17
commit 6e6c17e100
417 changed files with 17166 additions and 5870 deletions
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using Barotrauma.Extensions;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -378,14 +379,30 @@ namespace Barotrauma.Items.Components
foreach (Connection c in item.Connections)
{
connectionDirty[c] = true;
if (c.IsPower)
{
ChangedConnections.Add(c);
if (connectedRecipients.TryGetValue(c, out var recipients))
{
recipients.Where(c => c.IsPower).ForEach(c => ChangedConnections.Add(c));
}
}
}
}
public void SetConnectionDirty(Connection connection)
{
var connections = item.Connections;
if (connections == null || !connections.Contains(connection)) return;
if (connections == null || !connections.Contains(connection)) { return; }
connectionDirty[connection] = true;
if (connection.IsPower)
{
ChangedConnections.Add(connection);
if (connectedRecipients.TryGetValue(connection, out var recipients))
{
recipients.Where(c => c.IsPower).ForEach(c => ChangedConnections.Add(c));
}
}
}
public override void OnItemLoaded()