Broken junction boxes can't pass power from a box to another (wtf how have I not noticed this)

This commit is contained in:
Regalis
2016-12-01 17:34:02 +02:00
parent fada49d277
commit c6380c3774

View File

@@ -125,6 +125,8 @@ namespace Barotrauma.Items.Components
Item it = recipient.Item;
if (it == null) continue;
if (it.Condition <= 0.0f) continue;
Powered powered = it.GetComponent<Powered>();
if (powered == null || !powered.IsActive) continue;