protected new void Start() { base.Start(); vessel = this.GetComponent <Vessel>(); VesselModuleStaticData.AddVesselModuleToList(this); //register this module with the VSM manager VSMStart(); //run start code in all VSM modules InternalLoadCall(VesselModuleStaticData.GetSaveNode(this)); //always want to run load code after Start() to load data }
public void InternalSaveCall() //internal use only, do not use, background code to Save data { ConfigNode toSaveA = VesselModuleStaticData.GetSaveNode(this); if (toSaveA.name == "Empty") //if vessel not yet in file, returns an Empty config node. Have to apply vessel ID identifier before saving { toSaveA.name = this.vessel.id.ToString(); } toSaveA = VSMSave(VesselModuleStaticData.GetSaveNode(this)); //call VSMSave here for the actual OnSave call, this is where the data actually gets saved VesselModuleStaticData.SaveNodeData(this, toSaveA); //this writes to Static data, no need for return on method }