All Powered components of an item are taken into account in grid power/load calculations, not just the first one
This commit is contained in:
@@ -127,7 +127,8 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (it.Condition <= 0.0f) continue;
|
if (it.Condition <= 0.0f) continue;
|
||||||
|
|
||||||
Powered powered = it.GetComponent<Powered>();
|
foreach (Powered powered in it.GetComponents<Powered>())
|
||||||
|
{
|
||||||
if (powered == null || !powered.IsActive) continue;
|
if (powered == null || !powered.IsActive) continue;
|
||||||
|
|
||||||
if (connectedList.Contains(powered)) continue;
|
if (connectedList.Contains(powered)) continue;
|
||||||
@@ -167,6 +168,8 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user