Exemple #1
0
 public static bool DeleteSelectedShip()
 {
     if (selectedShip == null)
     {
         return(false);
     }
     if (System.IO.File.Exists(selectedShip.file.FullName) == false)
     {
         return(false);
     }
     shipData.remove(selectedShip);
     System.IO.File.Delete(selectedShip.file.FullName);
     selectedShip = null;
     return(true);
 }
Exemple #2
0
        //private ConfigNode currentShip = null;
        public void onSaveBtn()
        {
            print("onsavebtn called");
            Ship ship = shipData.tryGetShip(ShipConstruction.ShipConfig.GetValue("ship"), ShipConstruction.ShipConfig.GetValue("type"));

            if (ship != null)
            {
                print("No Name Change");
                shipData.remove(ship);
                FetchShipFile(ship.file);
            }
            else
            {
                FetchShipFiles();
            }
        }