finished building *Infos

This commit is contained in:
Chris Forbes
2010-01-10 17:28:05 +13:00
parent 9add15464c
commit 12b84a8468
48 changed files with 121 additions and 147 deletions

View File

@@ -12,7 +12,7 @@ namespace OpenRa.Game.GameRules
{
foreach( var b in Rules.Categories[ "Building" ] )
{
var info = (BuildingInfo)Rules.UnitInfo[ b ];
var info = (LegacyBuildingInfo)Rules.UnitInfo[ b ];
foreach( var p in info.Produces )
producesIndex[ p ].Add( info );
}
@@ -21,7 +21,7 @@ namespace OpenRa.Game.GameRules
public Cache<string, List<Actor>> GatherBuildings( Player player )
{
var ret = new Cache<string, List<Actor>>( x => new List<Actor>() );
foreach( var b in Game.world.Actors.Where( x => x.Owner == player && x.Info is BuildingInfo ) )
foreach( var b in Game.world.Actors.Where( x => x.Owner == player && x.Info is LegacyBuildingInfo ) )
ret[ b.Info.Name ].Add( b );
return ret;
}