speed up production if multiple buildings of the same type exist

This commit is contained in:
Matthias Mailänder
2013-01-19 23:54:53 +01:00
parent d4ea8aad8d
commit ecd4ff68a4
3 changed files with 31 additions and 2 deletions

View File

@@ -253,7 +253,7 @@ namespace OpenRA.Mods.RA
}
}
public int GetBuildTime(String unitString)
virtual public int GetBuildTime(String unitString)
{
var unit = Rules.Info[unitString];
if (unit == null || ! unit.Traits.Contains<BuildableInfo>())
@@ -263,7 +263,7 @@ namespace OpenRA.Mods.RA
var cost = unit.Traits.Contains<ValuedInfo>() ? unit.Traits.Get<ValuedInfo>().Cost : 0;
var time = cost
* Info.BuildSpeed
* (25 * 60) /* frames per min */ /* todo: build acceleration, if we do that */
* (25 * 60) /* frames per min */
/ 1000;
if (unit.Traits.Contains<CustomBuildTimeValueInfo>())