public void Save(ConfigNode node)
 {
     if (filename != null)
     {
         node.AddValue("filename", filename);
     }
     if (flagname != null)
     {
         node.AddValue("flagname", flagname);
     }
     if (craftConfig != null)
     {
         craftConfig.name = "CraftConfig";
         node.AddNode(craftConfig);
     }
     if (buildCost != null)
     {
         var bc = node.AddNode("BuildCost");
         buildCost.Save(bc);
     }
     if (builtStuff != null)
     {
         var bs = node.AddNode("BuiltStuff");
         builtStuff.Save(bs);
     }
     node.AddValue("state", state);
     node.AddValue("paused", paused);
     node.AddValue("KACalarmID", KACalarmID);
     if (vesselInfo != null)
     {
         ConfigNode vi = node.AddNode("DockedVesselInfo");
         vesselInfo.Save(vi);
     }
 }
Ejemplo n.º 2
0
 public override void OnSave(ConfigNode node)
 {
     node.AddValue("flagname", flagname);
     if (base_mass != 0)
     {
         node.AddValue("baseMass", base_mass);
     }
     if (craftConfig != null)
     {
         craftConfig.name = "CraftConfig";
         node.AddNode(craftConfig);
     }
     if (buildCost != null)
     {
         var bc = node.AddNode("BuildCost");
         buildCost.Save(bc);
     }
     if (builtStuff != null)
     {
         var bs = node.AddNode("BuiltStuff");
         builtStuff.Save(bs);
     }
     node.AddValue("state", state);
     node.AddValue("paused", paused);
     if (vesselInfo != null)
     {
         ConfigNode vi = node.AddNode("DockedVesselInfo");
         vesselInfo.Save(vi);
     }
 }
Ejemplo n.º 3
0
 public override void OnSave(ConfigNode node)
 {
     base.OnSave(node);
     node.AddValue("dockUId", this.dockedPartUId);
     if (this_vessel != null)
     {
         this_vessel.Save(node.AddNode("DOCKEDVESSEL"));
     }
     if (docked_vessel != null)
     {
         docked_vessel.Save(node.AddNode("DOCKEDVESSEL_Other"));
     }
     if (this.grappleNode != null)
     {
         node.AddValue("grapplePos", KSPUtil.WriteVector(this.grappleNode.position));
         node.AddValue("grappleOrt", KSPUtil.WriteVector(this.grappleNode.orientation));
         node.AddValue("grappleOrt2", KSPUtil.WriteVector(this.grappleNode.secondaryAxis));
     }
 }