Cleaned up some casts. (BuildingInfo)

This commit is contained in:
Bob
2009-11-14 02:57:52 +13:00
parent f4e55572d6
commit c285f1d210
12 changed files with 76 additions and 72 deletions

View File

@@ -1,23 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRa.Game.GameRules;
namespace OpenRa.Game.Traits
{
class McvDeploy : IOrder
using OpenRa.Game.GameRules;
namespace OpenRa.Game.Traits
{
class McvDeploy : IOrder
{
public McvDeploy(Actor self) { }
public McvDeploy(Actor self) { }
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 - new int2(1,1), self, false));
if( xy != self.Location ) return null;
return null;
}
}
}
var factBuildingInfo = (UnitInfo.BuildingInfo)Rules.UnitInfo[ "fact" ];
return OpenRa.Game.Order.DeployMcv(self, !Game.CanPlaceBuilding(factBuildingInfo, xy - new int2(1,1), self, false));
}
}
}