Fixed Powered ItemComponents (not components deriving from Powered) never resetting their voltage after receiving power, causing them to stay powered indefinitely. Closes #247

This commit is contained in:
Joonas Rikkonen
2018-02-05 22:31:55 +02:00
parent 74cd265952
commit ec302e099b
6 changed files with 16 additions and 11 deletions
@@ -59,10 +59,8 @@ namespace Barotrauma.Items.Components
}
currPowerConsumption = powerConsumption;
hasPower = voltage > minVoltage;
if (hasPower)
if (voltage > minVoltage)
{
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
}