diff --git a/OpenRA.Mods.Common/Traits/CustomBuildTimeValue.cs b/OpenRA.Mods.Common/Traits/CustomBuildTimeValue.cs index 4eae571a39..9c81615fc5 100644 --- a/OpenRA.Mods.Common/Traits/CustomBuildTimeValue.cs +++ b/OpenRA.Mods.Common/Traits/CustomBuildTimeValue.cs @@ -25,6 +25,8 @@ namespace OpenRA.Mods.Common.Traits public static class CustomBuildTimeValueExts { + const int FramesPerMin = 25 * 60; + public static int GetBuildTime(this ActorInfo a) { var csv = a.TraitInfoOrDefault(); @@ -32,11 +34,7 @@ namespace OpenRA.Mods.Common.Traits return csv.Value; var cost = a.HasTraitInfo() ? a.TraitInfo().Cost : 0; - var time = cost - * (25 * 60) /* frames per min */ - / 1000; - return - time; + return cost * FramesPerMin / 1000; } } }