Exemple #1
0
 void OnSelected(string fullPath, string flagUrl, CraftBrowser.LoadType loadType)
 {
     StartCoroutine(SpawnCraftRoutine(fullPath));
     craftBrowser        = null;
     openingCraftBrowser = false;
     choosingPosition    = true;
 }
 public void HookLoad(ShipConstruct SC, CraftBrowser.LoadType LT)
 {
     if (null != EditorLogic.RootPart)
     {
         DeactivateHighlight(EditorLogic.RootPart);
         HighlighterHook(EditorLogic.RootPart);
     }
 }
 private void EditorLoad(ShipConstruct data0, CraftBrowser.LoadType data1)
 {
     switch (data1)
     {
     case CraftBrowser.LoadType.Merge:
         RenameSections(data0);
         break;
     }
 }
Exemple #4
0
 /// <summary>
 /// Set up to fix default crew assignment when user loads ship. (Callback)
 /// </summary>
 /// <param name="ship">The ship just loaded</param>
 /// <param name="type">How the ship was inserted</param>
 protected void OnEditorLoad(ShipConstruct ship, CraftBrowser.LoadType type)
 {
     try {
         if (type == CraftBrowser.LoadType.Normal && loadBtnPressed)
         {
             // Unfortunately, the crew roster isn't set up yet here, so we
             // have to delay fixing the default assignment until either the
             // user opens the crew assignment tab, or they launch the craft.
             fixDefaultAssignment = true;
             loadBtnPressed       = false;
         }
     }
     catch (Exception e) {
         Debug.LogError("KerbalSorter: Unexpected error in EditorHook: " + e);
     }
 }
Exemple #5
0
        // public void Update(); declared in SaveManager.cs

        public static bool LoadSelectedShip(CraftBrowser.LoadType t)
        {
            if (selectedShip == null)
            {
                return(false);
            }
            if (t == CraftBrowser.LoadType.Normal)
            {
                EditorLogic.LoadShipFromFile(selectedShip.file.FullName);
            }
            else if (EditorLogic.RootPart == null)
            {
                return(false);
            }
            else
            {
                //ShipConstruction.LoadSubassembly(selectedShip.file.FullName);
                EditorLogic.fetch.SpawnTemplate(ShipConstruction.LoadTemplate(selectedShip.file.FullName));
            }
            return(true);
        }
 private void ResetEditorEvent(ShipConstruct construct, CraftBrowser.LoadType type)
 {
     ResetEditor();
 }
Exemple #7
0
 private void craftSelectComplete(string filename, string flagname,
                                  CraftBrowser.LoadType lt)
 {
     craftlist = null;
     control.LoadCraft(filename, flagname);
 }
Exemple #8
0
 private void OnEditorLoad(ShipConstruct s, CraftBrowser.LoadType t)
 {
     OnEditorShipModified(s);
     Logger.Log("OnEditorLoad called", Logger.Level.Debug);
 }
Exemple #9
0
 private void OnEditorLoad(ShipConstruct sp, CraftBrowser.LoadType lt)
 {
 }