public static void CheckTend(Caravan caravan) { for (int i = 0; i < caravan.pawns.Count; i++) { Pawn pawn = caravan.pawns[i]; if (CaravanTendUtility.IsValidDoctorFor(pawn, null, caravan)) { if (pawn.IsHashIntervalTick(1250)) { CaravanTendUtility.TryTendToAnyPawn(caravan); } } } }
private static Pawn FindBestDoctorFor(Caravan caravan, Pawn patient) { float num = 0f; Pawn pawn = null; List <Pawn> pawnsListForReading = caravan.PawnsListForReading; for (int i = 0; i < pawnsListForReading.Count; i++) { Pawn pawn2 = pawnsListForReading[i]; if (CaravanTendUtility.IsValidDoctorFor(pawn2, patient, caravan)) { float statValue = pawn2.GetStatValue(StatDefOf.MedicalTendQuality, true); if (statValue > num || pawn == null) { num = statValue; pawn = pawn2; } } } return(pawn); }