public bool checkDeliveries(MKSLTranferList savestring, MKSLTranferList completeddeliveries) { if (!savestring.Any()) { return(false); } bool action = false; foreach (var delivery in savestring) { if (Planetarium.GetUniversalTime() > Convert.ToDouble(delivery.arrivaltime)) {//FlightGlobals.ActiveVessel.id == delivery.VesselTo.id && //if return is true then add the returned if (attemptDelivery(delivery)) { completeddeliveries.Add(delivery); action = true; } } } if (action) { completeddeliveries.ForEach(x => savestring.Remove(x)); } return(action); }
//removes an entry from the current transfers public void removeCurrentTranfer(MKSLtransfer transRemove) { saveCurrentTransfersList.Remove(transRemove); savePreviousTransfersList.Add(transRemove); }