deploy mcv now requires clear space

This commit is contained in:
Chris Forbes
2009-11-01 21:29:05 +13:00
parent 98e64fc446
commit f4a5c9069b
7 changed files with 42 additions and 17 deletions

View File

@@ -1,7 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text;
using OpenRa.Game.GameRules;
namespace OpenRa.Game.Traits
{
@@ -9,17 +10,16 @@ namespace OpenRa.Game.Traits
{
public McvDeploy(Actor self)
{
}
public Order Order(Actor self, int2 xy, bool lmb, Actor underCursor)
{
if( lmb ) return null;
// TODO: check that there's enough space at the destination.
if( xy == self.Location )
return OpenRa.Game.Order.DeployMcv( self );
return null;
}
public Order Order(Actor self, int2 xy, bool lmb, Actor underCursor)
{
if (lmb) return null;
if (xy == self.Location)
return OpenRa.Game.Order.DeployMcv(self, !Game.CanPlaceBuilding("fact", xy, self));
return null;
}
}
}