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;
if (!powerDrain.TryGetValue(a, out amount))
return;
powerDrain.Remove(a);
if (devMode.UnlimitedPower)
return;
if (amount > 0)
totalProvided -= amount;
else if (amount < 0)
totalDrained += amount;
powerDrain.Remove(a);
}
int nextPowerAdviceTime = 0;