public void ExportConfig() { ConfigNode config = PlanetConfigExporter.CreateConfig(this); ConfigNode kopernicus = new ConfigNode("@Kopernicus:NEEDS[!Kopernicus]"); kopernicus.AddNode(config); ConfigNode wrapper = new ConfigNode(); wrapper.AddNode(kopernicus); // Save the node Directory.CreateDirectory(KSPUtil.ApplicationRootPath + "GameData/KittopiaTech/PluginData"); wrapper.Save("GameData/KittopiaTech/PluginData/" + name + ".cfg", "KittopiaTech - a Kopernicus Visual Editor"); }
public void ExportConfig() { ConfigNode config = PlanetConfigExporter.CreateConfig(this); ConfigNode kopernicus = new ConfigNode("@Kopernicus:NEEDS[!Kopernicus]"); kopernicus.AddNode(config); ConfigNode wrapper = new ConfigNode(); wrapper.AddNode(kopernicus); // Save the node String dir = "GameData/KittopiaTech/PluginData/" + celestialBody.transform.name + "/" + DateTime.Now.ToString("yyyy-MM-dd_hh-mm-ss"); Directory.CreateDirectory(KSPUtil.ApplicationRootPath + dir); wrapper.Save(dir + "/" + name + ".cfg", "KittopiaTech - a Kopernicus Visual Editor"); }
public override void OnSave(ConfigNode node) { PlanetConfigExporter.WriteToConfig(this, ref node); }