Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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;
                }
            }
        }
Ejemplo n.º 3
0
        public void OnSave(ConfigNode node)
        {
            //Save the eva list.
            // Might be double.
            foreach (var item in collection)
            {
                EvaSettings.SaveEva(item);
            }

            EvaSettings.Save();
        }
Ejemplo n.º 4
0
        public void Start()
        {
            EvaDebug.DebugWarning("EvaOrderController.Start()");

            //save config.
            //EvaSettings.SaveConfiguration();
            EvaSettings.LoadConfiguration();

            if (EvaSettings.displayDebugLines)
            {
                InitializeDebugLine();
            }

            InitializeCursor();
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Load the list
 /// </summary>
 private void onFlightReadyCallback()
 {
     //Load the eva list.
     EvaDebug.DebugLog("onFlightReadyCallback()");
     EvaSettings.Load();
 }