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

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRa.Game.Traits;
using OpenRa.Game.GameRules;
namespace OpenRa.Game
{
@@ -45,6 +46,10 @@ namespace OpenRa.Game
}
case "DeployMcv":
{
var bi = (UnitInfo.BuildingInfo)Rules.UnitInfo["fact"];
if (!Game.CanPlaceBuilding("fact", order.Subject.Location, order.Subject))
break; /* throw the order on the floor */
var mobile = order.Subject.traits.Get<Mobile>();
mobile.QueueActivity( new Mobile.Turn( 96 ) );
mobile.QueueActivity( new Traits.Activities.DeployMcv() );