Fix the horrible formatting in CustomBuildTimeValueExts
This commit is contained in:
@@ -25,6 +25,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
public static class CustomBuildTimeValueExts
|
public static class CustomBuildTimeValueExts
|
||||||
{
|
{
|
||||||
|
const int FramesPerMin = 25 * 60;
|
||||||
|
|
||||||
public static int GetBuildTime(this ActorInfo a)
|
public static int GetBuildTime(this ActorInfo a)
|
||||||
{
|
{
|
||||||
var csv = a.TraitInfoOrDefault<CustomBuildTimeValueInfo>();
|
var csv = a.TraitInfoOrDefault<CustomBuildTimeValueInfo>();
|
||||||
@@ -32,11 +34,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
return csv.Value;
|
return csv.Value;
|
||||||
|
|
||||||
var cost = a.HasTraitInfo<ValuedInfo>() ? a.TraitInfo<ValuedInfo>().Cost : 0;
|
var cost = a.HasTraitInfo<ValuedInfo>() ? a.TraitInfo<ValuedInfo>().Cost : 0;
|
||||||
var time = cost
|
return cost * FramesPerMin / 1000;
|
||||||
* (25 * 60) /* frames per min */
|
|
||||||
/ 1000;
|
|
||||||
return
|
|
||||||
time;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user