public override void Save(string outFile)
{
// iterate thru each tileset, call save on them
VarCollection vc = new VarCollection("Path");
StreamWriter sw = new StreamWriter(outFile);
foreach (string s in tilesets.Keys)
{
IXCTileset ts = (IXCTileset)tilesets[s];
if (ts != null)
{
vc.AddVar("rootPath", ts.MapPath);
vc.AddVar("rmpPath", ts.RmpPath);
vc.AddVar("blankPath", ts.BlankPath);
}
}
foreach (string v in vc.Variables)
{
Variable var = (Variable)vc.Vars[v];
sw.WriteLine(var.Name + ":" + var.Value);
}
foreach (string s in tilesets.Keys)
{
if (tilesets[s] != null)
{
((IXCTileset)tilesets[s]).Save(sw, vc);
}
}
sw.Close();
}