Fix the horrible formatting in CustomBuildTimeValueExts

This commit is contained in:
abcdefg30
2016-02-15 13:08:12 +01:00
parent be1080f7bd
commit 063321ea6b

View File

@@ -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<CustomBuildTimeValueInfo>();
@@ -32,11 +34,7 @@ namespace OpenRA.Mods.Common.Traits
return csv.Value;
var cost = a.HasTraitInfo<ValuedInfo>() ? a.TraitInfo<ValuedInfo>().Cost : 0;
var time = cost
* (25 * 60) /* frames per min */
/ 1000;
return
time;
return cost * FramesPerMin / 1000;
}
}
}