/// <summary> /// Removes bad components from ALL ships /// </summary> /// <param name="removalPercentage"></param> public static void RemoveAllBadComponents(uint removalPercentage) { var ships = Ships.GetShips(); foreach (Ship ship in ships) { ship.RemoveBadComponents(removalPercentage); } }
/// <summary> /// Fix the parentShip, and every ship in the tree below it recursivly /// </summary> /// <param name="parentShip">The top most ship to start with</param> public static void OutpostFix(Ship parentShip) { ShipFix(parentShip); var children = Ships.GetShipChildren(parentShip); foreach (Ship ship in children) { Ships.OutpostFix(ship); } }
/// <summary> /// Return a ship that this ship is docked to /// </summary> /// <returns>The parent Ship object, or null if no parent is found</returns> public Ship GetParentShip() { //TODO: Move this to Ships class where it belongs if (this.DockedToShipGUID != 0) { return(Ships.GetShip(this.DockedToShipGUID)); } else { return(null); } }