Fix some stupid bugs; remove hardcoded references to water/ore/tree terraintypes
This commit is contained in:
@@ -41,9 +41,8 @@ namespace OpenRA
|
||||
if (world.WorldActor.traits.Get<BuildingInfluence>().GetBuildingAt(a) != null) return false;
|
||||
if (world.WorldActor.traits.Get<UnitInfluence>().GetUnitsAt(a).Any(b => b != toIgnore)) return false;
|
||||
|
||||
// Todo: Unhardcode "Water" terraintype reference
|
||||
if (waterBound)
|
||||
return world.Map.IsInMap(a.X,a.Y) && GetTerrainType(world,a) == "Water";
|
||||
return world.Map.IsInMap(a.X,a.Y) && GetTerrainInfo(world,a).IsWater;
|
||||
|
||||
return world.Map.IsInMap(a.X, a.Y) && world.GetTerrainInfo(a).Buildable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user