SHOW:
|
|
- or go back to the newest paste.
| 1 | Index: Constructor/Operations/ExportAirfields.cs | |
| 2 | =================================================================== | |
| 3 | --- Constructor/Operations/ExportAirfields.cs (revision 6378) | |
| 4 | +++ Constructor/Operations/ExportAirfields.cs (working copy) | |
| 5 | - | @@ -86,6 +86,8 @@ |
| 5 | + | @@ -86,6 +86,7 @@ |
| 6 | var airfieldDir = appEnv.terrainConfig.AirfieldsDir.AbsoluteByRelativeTcons(); | |
| 7 | ||
| 8 | var airfieldLua = System.IO.Path.Combine(airfieldDir, airfield.name + ".extra.cfg.lua"); | |
| 9 | + System.IO.File.Delete(airfieldLua); | |
| 10 | - | + System.IO.File.Create(airfieldLua); |
| 10 | + | |
| 11 | command = new Command(); | |
| 12 | command.EdtuCommand = "build-airfield"; | |
| 13 | Index: Constructor/Operations/TerrainConfig.cs | |
| 14 | =================================================================== | |
| 15 | --- Constructor/Operations/TerrainConfig.cs (revision 6378) | |
| 16 | +++ Constructor/Operations/TerrainConfig.cs (working copy) | |
| 17 | @@ -1267,13 +1267,6 @@ | |
| 18 | "); | |
| 19 | ||
| 20 | var airfields = AppEnv.Instance.Project.Airfields; | |
| 21 | - for (int i = 0; i != airfields.Count; ++i) | |
| 22 | - {
| |
| 23 | - if (!airfields[i].Enabled) | |
| 24 | - continue; | |
| 25 | - b.AppendLine(airfields[i].name + " = " + (i+1)); | |
| 26 | - } | |
| 27 | - b.AppendLine(); | |
| 28 | ||
| 29 | b.AppendLine("Airdromes = {}");
| |
| 30 | b.AppendLine(); | |
| 31 | @@ -1330,7 +1323,7 @@ | |
| 32 | ||
| 33 | var airfieldLua = System.IO.Path.Combine(airfieldDir, airfield.name + ".cfg.lua"); | |
| 34 | ||
| 35 | - b.AppendLine("Airdromes[" + airfield.name + "] = {");
| |
| 36 | + b.AppendLine("Airdromes[\"" + airfield.name + "\"] = {");
| |
| 37 | ||
| 38 | b.AppendLine(string.Format("\tcode = \"{0}\",", airfieldData.Code));
| |
| 39 | b.AppendLine(string.Format("\tclass = \"{0}\",", airfieldData.Class)); |