internal static void EmptySeat(ProtoPartSnapshot crewPart, int seatNumber) { foreach (ProtoCrewMember oldCrew in crewPart.protoModuleCrew.Where(x => x.seatIdx == seatNumber).ToArray()) { crewPart.protoModuleCrew.Remove(oldCrew); oldCrew.rosterStatus = ProtoCrewMember.RosterStatus.Available; oldCrew.seatIdx = -1; crewPart.protoCrewNames.Remove(oldCrew.name); selectedVessel.RemoveCrew(oldCrew); } }