//Checks to make sure there is at least one kerbal as a DNA source and that there is room to store the new kerbal private bool PartHasRoom(Part part) { if (!SettingsInterface.RequireLivingKerbal()) { //ScreenMessages.PostScreenMessage("Kloning does not need a living kerbal", 3.5f, ScreenMessageStyle.UPPER_CENTER); Utilities.msg("Kloning does not need a living kerbal", 3.5f, ScreenMessageStyle.UPPER_CENTER); } else if (part.protoModuleCrew.Count == 0) { Utilities.msg("Kloning requires at least one test subject", 3.5f, ScreenMessageStyle.UPPER_CENTER); //Log.dbg(String.Format("Kloning requires at least one test subject, no one in: {0}", part.name.ToString())); return(false); } // Log.dbg("Crew counts {0} = {1}", part.protoModuleCrew.Count, part.CrewCapacity); if (part.protoModuleCrew.Count == part.CrewCapacity) { Utilities.msg("No room left in Kloning Bay", 3.5f, ScreenMessageStyle.UPPER_CENTER); //Log.dbg("Kloning requires at least one test subject, No room left in: ", part.name); return(false); } return(true); }
//Checks to make sure there is at least one kerbal as a DNA source and that there is room to store the new kerbal private bool PartHasRoom(Part part) { if ((part.protoModuleCrew.Count < part.CrewCapacity) && ((part.protoModuleCrew.Count > 0) || SettingsInterface.RequireLivingKerbal())) { return(true); } else { if (part.protoModuleCrew.Count == 0) { ScreenMessages.PostScreenMessage("Kloning requires a test subject Kerbal", 3.5f, ScreenMessageStyle.UPPER_CENTER); } else if (part.protoModuleCrew.Count == part.CrewCapacity) { ScreenMessages.PostScreenMessage("No room left in Kloning Bay", 3.5f, ScreenMessageStyle.UPPER_CENTER); } return(false); } }