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

@@ -28,7 +28,6 @@ namespace OpenRA.Mods.D2k.Traits
{
readonly BuildableTerrainLayerInfo info;
readonly Dictionary<CPos, Sprite> dirty = new Dictionary<CPos, Sprite>();
readonly TileSet tileset;
readonly Map map;
TerrainSpriteLayer render;
@@ -37,7 +36,6 @@ namespace OpenRA.Mods.D2k.Traits
public BuildableTerrainLayer(Actor self, BuildableTerrainLayerInfo info)
{
this.info = info;
tileset = self.World.TileSet;
map = self.World.Map;
}
@@ -49,7 +47,7 @@ namespace OpenRA.Mods.D2k.Traits
public void AddTile(CPos cell, TerrainTile tile)
{
map.CustomTerrain[cell] = tileset.GetTerrainIndex(tile);
map.CustomTerrain[cell] = map.Rules.TileSet.GetTerrainIndex(tile);
// Terrain tiles define their origin at the topleft
var s = theater.TileSprite(tile);