public void Load(Vessel vessel) { if (!vessel.isEVA) { EvaDebug.DebugWarning("Tried loading a non eva."); return; } KerbalEVA currentEVA = vessel.GetComponent <KerbalEVA>(); if (!Contains(vessel.id)) { EvaContainer container = new EvaContainer(vessel.id); //load the vessel here. container.Load(currentEVA); EvaSettings.LoadEva(container); collection.Add(container); } else { //Reload EvaContainer container = GetEva(vessel.id); container.Load(currentEVA); EvaSettings.LoadEva(container); } }
public void Unload(Vessel vessel, bool delete) { if (!vessel.isEVA) { EvaDebug.DebugWarning("Tried unloading a non eva."); return; } EvaDebug.DebugLog("Unload(" + vessel.name + ")"); foreach (var item in collection) { if (item.flightID == vessel.id) { if (delete) { item.status = Status.Removed; } //unload the vessel here. item.Unload(); EvaSettings.SaveEva(item); EvaDebug.DebugLog("Remove EVA: (" + vessel.name + ")"); collection.Remove(item); break; } } }
public void OnSave(ConfigNode node) { //Save the eva list. // Might be double. foreach (var item in collection) { EvaSettings.SaveEva(item); } EvaSettings.Save(); }
public void Start() { EvaDebug.DebugWarning("EvaOrderController.Start()"); //save config. //EvaSettings.SaveConfiguration(); EvaSettings.LoadConfiguration(); if (EvaSettings.displayDebugLines) { InitializeDebugLine(); } InitializeCursor(); }
/// <summary> /// Load the list /// </summary> private void onFlightReadyCallback() { //Load the eva list. EvaDebug.DebugLog("onFlightReadyCallback()"); EvaSettings.Load(); }