Don't remove power while the dev hack is enabled
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user