(6cc2e0541) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
This commit is contained in:
@@ -180,7 +180,8 @@ namespace Barotrauma.Items.Components
|
||||
#endif
|
||||
|
||||
//items in a bad condition are more sensitive to overvoltage
|
||||
float maxOverVoltage = MathHelper.Lerp(Math.Min(OverloadVoltage, 1.0f), OverloadVoltage, item.Condition / item.MaxCondition);
|
||||
float maxOverVoltage = MathHelper.Lerp(OverloadVoltage * 0.75f, OverloadVoltage, item.Condition / item.MaxCondition);
|
||||
maxOverVoltage = Math.Max(OverloadVoltage, 1.0f);
|
||||
|
||||
//if the item can't be fixed, don't allow it to break
|
||||
if (!item.Repairables.Any() || !CanBeOverloaded) continue;
|
||||
|
||||
@@ -1286,11 +1286,7 @@ namespace Barotrauma
|
||||
LastSentSignalRecipients.Clear();
|
||||
if (connections == null) return;
|
||||
|
||||
public List<T> GetConnectedComponentsRecursive<T>(Connection c) where T : ItemComponent
|
||||
{
|
||||
List<T> connectedComponents = new List<T>();
|
||||
List<Item> alreadySearched = new List<Item>() { this };
|
||||
GetConnectedComponentsRecursive(c, alreadySearched, connectedComponents);
|
||||
stepsTaken++;
|
||||
|
||||
if (!connections.TryGetValue(connectionName, out Connection c)) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user