moved helper functions out of Game, into WorldUtils

This commit is contained in:
Bob
2010-01-18 02:46:22 +13:00
parent 6f0c2c5a5d
commit ab1abee843
31 changed files with 176 additions and 163 deletions

View File

@@ -50,7 +50,7 @@ namespace OpenRa.Orders
.FirstOrDefault(a => a != null);
return c ??
(Game.SelectActorsInBox(Game.CellSize * p,
(Game.world.SelectActorsInBox(Game.CellSize * p,
Game.CellSize * p).Any()
? Cursor.Select : Cursor.Default);
}
@@ -70,7 +70,7 @@ namespace OpenRa.Orders
return Cursor.MoveBlocked;
case "DeployMcv":
var factBuildingInfo = Rules.ActorInfo["fact"].Traits.Get<BuildingInfo>();
if (Game.CanPlaceBuilding("fact", factBuildingInfo, a.Location - new int2(1, 1), a, false))
if (Game.world.CanPlaceBuilding("fact", factBuildingInfo, a.Location - new int2(1, 1), a, false))
return Cursor.Deploy;
else
return Cursor.DeployBlocked;