Move GetTerrainIndex/Info from WorldUtils to Map

This commit is contained in:
Pavlos Touboulidis
2014-06-13 13:57:32 +03:00
parent 0cf2d608e4
commit c282fa1077
20 changed files with 43 additions and 39 deletions

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Mods.RA.Buildings
if (world.WorldActor.Trait<BuildingInfluence>().GetBuildingAt(a) != null) return false;
if (world.ActorMap.GetUnitsAt(a).Any(b => b != toIgnore)) return false;
return world.Map.IsInMap(a) && bi.TerrainTypes.Contains(world.GetTerrainInfo(a).Type);
return world.Map.IsInMap(a) && bi.TerrainTypes.Contains(world.Map.GetTerrainInfo(a).Type);
}
public static bool CanPlaceBuilding(this World world, string name, BuildingInfo building, CPos topLeft, Actor toIgnore)