private void ReadTerrain()
{
IniSection terrainSection = GetSection("Terrain");
if (terrainSection == null) return;
foreach (var v in terrainSection.OrderedEntries) {
int pos;
if (int.TryParse(v.Key, out pos)) {
string name = v.Value;
int rx = pos % 1000;
int ry = pos / 1000;
var t = new Terrain(name);
t.Tile = Tiles.GetTileR(rx, ry);
if (t.Tile != null)
Terrains.Add(t);
}
}
Logger.Debug("Read {0} terrain objects", Terrains.Count);
}