Don't remove power while the dev hack is enabled

This commit is contained in:
abcdefg30
2015-01-11 21:37:32 +01:00
parent 25abdfbcd6
commit b7d8b2c6b3

View File

@@ -72,11 +72,15 @@ namespace OpenRA.Mods.Common.Traits
int amount; int amount;
if (!powerDrain.TryGetValue(a, out amount)) if (!powerDrain.TryGetValue(a, out amount))
return; return;
powerDrain.Remove(a);
if (devMode.UnlimitedPower)
return;
if (amount > 0) if (amount > 0)
totalProvided -= amount; totalProvided -= amount;
else if (amount < 0) else if (amount < 0)
totalDrained += amount; totalDrained += amount;
powerDrain.Remove(a);
} }
int nextPowerAdviceTime = 0; int nextPowerAdviceTime = 0;