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

@@ -33,7 +33,7 @@ namespace OpenRa.Traits
{
case "StartProduction":
{
var unit = Rules.NewUnitInfo[ order.TargetString ];
var unit = Rules.ActorInfo[ order.TargetString ];
var ui = unit.Traits.Get<BuildableInfo>();
var time = ui.Cost
* Rules.General.BuildSpeed /* todo: country-specific build speed bonus */
@@ -65,7 +65,7 @@ namespace OpenRa.Traits
}
case "PauseProduction":
{
var producing = CurrentItem( Rules.NewUnitInfo[ order.TargetString ].Category );
var producing = CurrentItem( Rules.ActorInfo[ order.TargetString ].Category );
if( producing != null && producing.Item == order.TargetString )
producing.Paused = ( order.TargetLocation.X != 0 );
break;
@@ -95,7 +95,7 @@ namespace OpenRa.Traits
public void CancelProduction( string itemName )
{
var category = Rules.NewUnitInfo[itemName].Category;
var category = Rules.ActorInfo[itemName].Category;
var queue = production[ category ];
if (queue.Count == 0) return;
@@ -126,7 +126,7 @@ namespace OpenRa.Traits
public void BuildUnit( string name )
{
var newUnitType = Rules.NewUnitInfo[ name ];
var newUnitType = Rules.ActorInfo[ name ];
var producerTypes = Rules.TechTree.UnitBuiltAt( newUnitType );
Actor producer = null;