Rename TileTemplate -> TerrainTemplateInfo.

This commit is contained in:
Paul Chote
2014-10-24 14:55:15 +13:00
parent ab2bc789ce
commit c3b6f9bef6
3 changed files with 7 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ namespace OpenRA
public MiniYaml Save() { return FieldSaver.Save(this); } public MiniYaml Save() { return FieldSaver.Save(this); }
} }
public class TileTemplate public class TerrainTemplateInfo
{ {
static readonly string[] Fields = { "Id", "Image", "Frames", "Size", "PickAny", "Category" }; static readonly string[] Fields = { "Id", "Image", "Frames", "Size", "PickAny", "Category" };
@@ -55,14 +55,14 @@ namespace OpenRA
TerrainTileInfo[] tileInfo; TerrainTileInfo[] tileInfo;
public TileTemplate(ushort id, string image, int2 size, byte[] tiles) public TerrainTemplateInfo(ushort id, string image, int2 size, byte[] tiles)
{ {
this.Id = id; this.Id = id;
this.Image = image; this.Image = image;
this.Size = size; this.Size = size;
} }
public TileTemplate(TileSet tileSet, MiniYaml my) public TerrainTemplateInfo(TileSet tileSet, MiniYaml my)
{ {
FieldLoader.Load(this, my); FieldLoader.Load(this, my);
@@ -157,7 +157,7 @@ namespace OpenRA
public readonly string PlayerPalette; public readonly string PlayerPalette;
public readonly string[] Extensions; public readonly string[] Extensions;
public readonly int WaterPaletteRotationBase = 0x60; public readonly int WaterPaletteRotationBase = 0x60;
public readonly Dictionary<ushort, TileTemplate> Templates = new Dictionary<ushort, TileTemplate>(); public readonly Dictionary<ushort, TerrainTemplateInfo> Templates = new Dictionary<ushort, TerrainTemplateInfo>();
public readonly string[] EditorTemplateOrder; public readonly string[] EditorTemplateOrder;
public readonly TerrainTypeInfo[] TerrainInfo; public readonly TerrainTypeInfo[] TerrainInfo;
@@ -194,7 +194,7 @@ namespace OpenRA
// Templates // Templates
Templates = yaml["Templates"].ToDictionary().Values Templates = yaml["Templates"].ToDictionary().Values
.Select(y => new TileTemplate(this, y)).ToDictionary(t => t.Id); .Select(y => new TerrainTemplateInfo(this, y)).ToDictionary(t => t.Id);
} }
public TileSet(string name, string id, string palette, string[] extensions, TerrainTypeInfo[] terrainInfo) public TileSet(string name, string id, string palette, string[] extensions, TerrainTypeInfo[] terrainInfo)

View File

@@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA.Buildings
readonly LaysTerrainInfo info; readonly LaysTerrainInfo info;
readonly BuildableTerrainLayer layer; readonly BuildableTerrainLayer layer;
readonly BuildingInfluence bi; readonly BuildingInfluence bi;
readonly TileTemplate template; readonly TerrainTemplateInfo template;
public LaysTerrain(Actor self, LaysTerrainInfo info) public LaysTerrain(Actor self, LaysTerrainInfo info)
{ {

View File

@@ -393,7 +393,7 @@ namespace OpenRA.TilesetBuilder
tiles[idx] = tileset.GetTerrainIndex(ttype); tiles[idx] = tileset.GetTerrainIndex(ttype);
} }
var template = new TileTemplate( var template = new TerrainTemplateInfo(
id: cur, id: cur,
image: "{0}{1:00}".F(txtTilesetName.Text, cur), image: "{0}{1:00}".F(txtTilesetName.Text, cur),
size: new int2(tp.Width, tp.Height), size: new int2(tp.Width, tp.Height),