Unhardcode terrain types. Needs a bit more work re initialization and bridges

This commit is contained in:
Paul Chote
2010-06-26 10:55:29 +12:00
parent 8fbbaddce9
commit bf6b2da1a8
31 changed files with 138 additions and 3127 deletions

View File

@@ -49,7 +49,7 @@ namespace OpenRA.Mods.RA
void ConvertBridgeToActor(World w, int i, int j)
{
Log.Write("debug", "Converting bridge at {0} {1}", i, j);
/*
var tile = w.Map.MapTiles[i, j].type;
var image = w.Map.MapTiles[i, j].image;
var template = w.TileSet.walk[tile];
@@ -88,18 +88,20 @@ namespace OpenRA.Mods.RA
br.SetTiles(w, template, replacedTiles);
}
*/
}
public string GetTerrainType(int2 cell)
{
if (bridges[ cell.X, cell.Y ] != null)
return bridges[ cell.X, cell.Y ].GetTerrainType(cell);
/*if (bridges[ cell.X, cell.Y ] != null)
return bridges[ cell.X, cell.Y ].GetTerrainType(cell);*/
return null;
}
static bool IsBridge(World w, ushort t)
{
return w.TileSet.walk[t].Bridge != null;
return false;
//return w.TileSet.walk[t].Bridge != null;
}
public void WorldLoaded(World w)