Remove World.TileSet.

This commit is contained in:
Paul Chote
2016-02-18 18:54:30 +00:00
parent 7993068c8f
commit 602acabe47
34 changed files with 59 additions and 65 deletions

View File

@@ -158,9 +158,8 @@ namespace OpenRA.Mods.Common.Traits
if (!checkTerrainType)
return true;
var tileSet = self.World.TileSet;
var tiles = self.World.Map.MapTiles.Value;
var terrainType = tileSet[tileSet.GetTerrainIndex(tiles[self.Location])].Type;
var terrainType = self.World.Map.GetTerrainInfo(self.Location).Type;
return info.AllowedTerrainTypes.Contains(terrainType);
}
@@ -174,7 +173,7 @@ namespace OpenRA.Mods.Common.Traits
if (self.World.Map.Contains(self.Location))
{
var tile = self.World.Map.MapTiles.Value[self.Location];
var ti = self.World.TileSet.GetTileInfo(tile);
var ti = self.World.Map.Rules.TileSet.GetTileInfo(tile);
if (ti != null)
ramp = ti.RampType;
}