Ejemplo n.º 1
0
 public void OnSave(ConfigNode node)
 {
     node.AddValue("partName", availablePart.name);
     node.AddValue("slot", slot);
     ConfigAccessor.WriteFieldsIntoNode(
         node, GetType(), this, group: StdPersistentGroups.PartPersistant);
     // Items in pod and container may have equipped status True but they are not actually equipped,
     // so there is no equipped part.
     if (equipped && equippedPart != null &&
         (equipMode == EquipMode.Part || equipMode == EquipMode.Physic))
     {
         HostedDebugLog.Info(
             inventory, "Update config node of equipped part: {0}", availablePart.name);
         partNode = KISAPI.PartNodeUtils.PartSnapshot(equippedPart);
     }
     partNode.CopyTo(node.AddNode("PART"));
 }
Ejemplo n.º 2
0
 /// <inheritdoc/>
 public override void OnSave(ConfigNode node)
 {
     base.OnSave(node);
     ConfigAccessor.WriteFieldsIntoNode(node, GetType(), this, StdPersistentGroups.PartPersistant);
 }