Change LowPowerSlowdown to LowPowerModifier

This commit is contained in:
Mustafa Alperen Seki
2018-09-29 16:36:21 +03:00
committed by Paul Chote
parent 831ec0aeda
commit 53304a0353
2 changed files with 11 additions and 10 deletions

View File

@@ -106,10 +106,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
var buildTime = tooltipIcon.ProductionQueue == null ? 0 : tooltipIcon.ProductionQueue.GetBuildTime(actor, buildable);
var timeMultiplier = pm != null && pm.PowerState != PowerState.Normal ? tooltipIcon.ProductionQueue.Info.LowPowerSlowdown : 1;
var timeModifier = pm != null && pm.PowerState != PowerState.Normal ? tooltipIcon.ProductionQueue.Info.LowPowerModifier : 100;
timeLabel.Text = formatBuildTime.Update(buildTime * timeMultiplier);
timeLabel.TextColor = (pm != null && pm.PowerState != PowerState.Normal && tooltipIcon.ProductionQueue.Info.LowPowerSlowdown > 1) ? Color.Red : Color.White;
timeLabel.Text = formatBuildTime.Update((buildTime * timeModifier) / 100);
timeLabel.TextColor = (pm != null && pm.PowerState != PowerState.Normal && tooltipIcon.ProductionQueue.Info.LowPowerModifier > 100) ? Color.Red : Color.White;
var timeSize = font.Measure(timeLabel.Text);
costLabel.Text = cost.ToString();