Example #1
0
 internal static void FillCrew(Part part)
 {
     //Utilities.LogMessage(string.Format("Entering Fill Crew with part {0}", part.partInfo.name), Utilities.LogType.Info, true);
     if (IsCrewFull(part))
     {
         return;
     }
     while (part.CrewCapacity > SmUtils.GetPartCrewCount(part))
     {
         ProtoCrewMember kerbal = HighLogic.CurrentGame.CrewRoster.GetNextOrNewKerbal();
         part.AddCrewmember(kerbal);
         //Utilities.LogMessage(string.Format("Filling crew in part {0}", part.partInfo.name), Utilities.LogType.Info, true);
         if (kerbal.seat != null)
         {
             kerbal.seat.SpawnCrew();
         }
     }
     SMAddon.FireEventTriggers();
 }