diff --git a/OpenRA.Mods.Common/Traits/Buildable.cs b/OpenRA.Mods.Common/Traits/Buildable.cs index 441d706cbd..f8d2fbd58f 100644 --- a/OpenRA.Mods.Common/Traits/Buildable.cs +++ b/OpenRA.Mods.Common/Traits/Buildable.cs @@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits public readonly int BuildDuration = -1; [Desc("Percentage modifier to apply to the build duration.")] - public readonly int BuildDurationModifier = 150; + public readonly int BuildDurationModifier = 60; // TODO: UI fluff; doesn't belong here public readonly int BuildPaletteOrder = 9999; diff --git a/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs b/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs index 81f7d01f20..836289b143 100644 --- a/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs +++ b/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs @@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Traits public readonly bool Sticky = true; [Desc("This percentage value is multiplied with actor cost to translate into build time (lower means faster).")] - public readonly int BuildSpeed = 40; + public readonly int BuildDurationModifier = 100; [Desc("The build time is multiplied with this value on low power.")] public readonly int LowPowerSlowdown = 3; @@ -327,7 +327,7 @@ namespace OpenRA.Mods.Common.Traits time = valued != null ? valued.Cost : 0; } - time = time * bi.BuildDurationModifier * Info.BuildSpeed / 10000; + time = time * bi.BuildDurationModifier * Info.BuildDurationModifier / 10000; return time; } diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index 367b2bf19f..0a54f842b0 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -321,12 +321,21 @@ namespace OpenRA.Mods.Common.UtilityCommands var value = cbtv.Value.Nodes.First(n => n.Key == "Value"); value.Key = "BuildDuration"; bi.Value.Nodes.Add(value); - bi.Value.Nodes.Add(new MiniYamlNode("BuildDurationModifier", "100")); + bi.Value.Nodes.Add(new MiniYamlNode("BuildDurationModifier", "40")); } node.Value.Nodes.RemoveAll(n => n.Key == "CustomBuildTimeValue"); node.Value.Nodes.RemoveAll(n => n.Key == "-CustomBuildTimeValue"); } + + // rename ProductionQueue.BuildSpeed + if (node.Key == "BuildSpeed") + { + node.Key = "BuildDurationModifier"; + var oldValue = FieldLoader.GetValue(node.Key, node.Value.Value); + oldValue = oldValue * 100 / 40; + node.Value.Value = oldValue.ToString(); + } } UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);