deploy mcv now requires clear space
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user