moving Map, TileSet from Rules to World

This commit is contained in:
Bob
2010-01-17 12:18:26 +13:00
parent fa421410fe
commit 1ec3ee60eb
19 changed files with 135 additions and 130 deletions

View File

@@ -36,8 +36,8 @@ namespace OpenRa.Traits.Activities
var renderUnit = self.traits.Get<RenderUnit>(); /* better have one of these! */
var isGem = false;
if (!Rules.Map.ContainsResource(self.Location) ||
!Rules.Map.Harvest(self.Location, out isGem))
if (!Game.world.Map.ContainsResource(self.Location) ||
!Game.world.Map.Harvest(self.Location, out isGem))
return false;
var harvestAnim = "harvest" + Util.QuantizeFacing(unit.Facing, 8);
@@ -58,7 +58,7 @@ namespace OpenRa.Traits.Activities
{
var search = new PathSearch
{
heuristic = loc => (Rules.Map.ContainsResource(loc) ? 0 : 1),
heuristic = loc => (Game.world.Map.ContainsResource(loc) ? 0 : 1),
umt = UnitMovementType.Wheel,
checkForBlocked = true
};