Traits can now resolve orders (ATM, they all resolve the orders they issue)

This commit is contained in:
Bob
2009-11-25 20:42:03 +13:00
parent e9b87640bd
commit 7c1c0835e1
10 changed files with 117 additions and 82 deletions

View File

@@ -83,7 +83,7 @@ namespace OpenRa.Game
var underCursor = Game.UnitInfluence.GetUnitAt( xy ) ?? Game.BuildingInfluence.GetBuildingAt( xy );
return traits.WithInterface<Traits.IOrder>()
.Select( x => x.Order( this, xy, lmb, underCursor ) )
.Select( x => x.IssueOrder( this, xy, lmb, underCursor ) )
.FirstOrDefault( x => x != null );
}
@@ -149,10 +149,10 @@ namespace OpenRa.Game
act.NextActivity = nextActivity;
}
public void CancelActivity( Actor self )
public void CancelActivity()
{
if( currentActivity != null )
currentActivity.Cancel( self );
currentActivity.Cancel( this );
}
// For pathdebug, et al