Rules.NewUnitInfo rename -> ActorInfo

This commit is contained in:
Chris Forbes
2010-01-17 11:07:08 +13:00
parent 33ba3a58c5
commit d1ecfacd55
10 changed files with 23 additions and 23 deletions

View File

@@ -11,7 +11,7 @@ namespace OpenRa.GameRules
public TechTree()
{
foreach( var info in Rules.NewUnitInfo.Values )
foreach( var info in Rules.ActorInfo.Values )
{
var pi = info.Traits.GetOrDefault<ProductionInfo>();
if (pi != null)
@@ -62,7 +62,7 @@ namespace OpenRa.GameRules
public IEnumerable<ActorInfo> AllBuildables(Player player, params string[] categories)
{
return Rules.NewUnitInfo.Values
return Rules.ActorInfo.Values
.Where( x => x.Name[ 0 ] != '^' )
.Where( x => categories.Contains( x.Category ) )
.Where( x => x.Traits.Contains<BuildableInfo>() );
@@ -72,7 +72,7 @@ namespace OpenRa.GameRules
{
var builtAt = info.Traits.Get<BuildableInfo>().BuiltAt;
if( builtAt.Length != 0 )
return builtAt.Select( x => Rules.NewUnitInfo[ x.ToLowerInvariant() ] );
return builtAt.Select( x => Rules.ActorInfo[ x.ToLowerInvariant() ] );
else
return producesIndex[ info.Category ];
}