Inheritance: UnityEngine.MonoBehaviour
        private void FillVessel()
        {
            foreach (var part in CrewableParts)
            {
                AddCrew(part.CrewCapacity - part.protoModuleCrew.Count, part, false);
            }

            ManifestBehaviour.FireVesselUpdated();
        }
        private void MoveKerbal(Part source, Part target, ProtoCrewMember kerbal)
        {
            RemoveCrew(kerbal, source, false);

            AddCrew(target, kerbal, false);

            // RemoveCrew works fine alone and AddCrew works fine alone, but if you combine them, it seems you must give KSP a moment to sort it all out,
            // so delay the remaining steps of the transfer process.
            ManifestBehaviour.BeginDelayedCrewTransfer(source, target, kerbal);
        }
        private void RemoveCrew(ProtoCrewMember member, Part part, bool fireVesselUpdate)
        {
            part.RemoveCrewmember(member);
            member.seat         = null;
            member.rosterStatus = ProtoCrewMember.RosterStatus.Available;

            if (fireVesselUpdate)
            {
                ManifestBehaviour.FireVesselUpdated();
            }
        }
        private void EmptyVessel()
        {
            foreach (var part in CrewableParts)
            {
                for (int i = part.protoModuleCrew.Count - 1; i >= 0; i--)
                {
                    RemoveCrew(part.protoModuleCrew[i], part, false);
                }
            }

            ManifestBehaviour.FireVesselUpdated();
        }
        private void AddCrew(Part part, ProtoCrewMember kerbal, bool fireVesselUpdate)
        {
            part.AddCrewmember(kerbal);

            kerbal.rosterStatus = ProtoCrewMember.RosterStatus.Assigned;
            if (kerbal.seat != null)
            {
                kerbal.seat.SpawnCrew();
            }

            if (fireVesselUpdate)
            {
                ManifestBehaviour.FireVesselUpdated();
            }
        }
        private void AddCrew(int count, Part part, bool fireVesselUpdate)
        {
            if (IsPreLaunch && !PartIsFull(part))
            {
                for (int i = 0; i < part.CrewCapacity && i < count; i++)
                {
                    ProtoCrewMember kerbal = HighLogic.CurrentGame.CrewRoster.GetNextOrNewKerbal();

                    this.AddCrew(part, kerbal, false);
                }

                if (fireVesselUpdate)
                {
                    ManifestBehaviour.FireVesselUpdated();
                }
            }
        }