rename NewUnitInfo -> ActorInfo

This commit is contained in:
Chris Forbes
2010-01-17 10:00:46 +13:00
parent a2e1fe3d4f
commit a3ab1d77e7
9 changed files with 15 additions and 15 deletions

View File

@@ -7,7 +7,7 @@ namespace OpenRa.GameRules
{
public class TechTree
{
readonly Cache<string, List<NewUnitInfo>> producesIndex = new Cache<string, List<NewUnitInfo>>(x => new List<NewUnitInfo>());
readonly Cache<string, List<ActorInfo>> producesIndex = new Cache<string, List<ActorInfo>>(x => new List<ActorInfo>());
public TechTree()
{
@@ -34,7 +34,7 @@ namespace OpenRa.GameRules
return ret;
}
public bool CanBuild( NewUnitInfo info, Player player, Cache<string, List<Actor>> playerBuildings )
public bool CanBuild( ActorInfo info, Player player, Cache<string, List<Actor>> playerBuildings )
{
var bi = info.Traits.GetOrDefault<BuildableInfo>();
if( bi == null ) return false;
@@ -60,7 +60,7 @@ namespace OpenRa.GameRules
yield return unit.Name;
}
public IEnumerable<NewUnitInfo> AllBuildables(Player player, params string[] categories)
public IEnumerable<ActorInfo> AllBuildables(Player player, params string[] categories)
{
return Rules.NewUnitInfo.Values
.Where( x => x.Name[ 0 ] != '^' )
@@ -68,7 +68,7 @@ namespace OpenRa.GameRules
.Where( x => x.Traits.Contains<BuildableInfo>() );
}
public IEnumerable<NewUnitInfo> UnitBuiltAt( NewUnitInfo info )
public IEnumerable<ActorInfo> UnitBuiltAt( ActorInfo info )
{
var builtAt = info.Traits.Get<BuildableInfo>().BuiltAt;
if( builtAt.Length != 0 )