public void turnPregnantSomeFemales( Vessel v, double now, IEnumerable <CivPopCouple> couples, bool breedingAllowed) { if (v == null) { SimpleLogger.fetch.Info("turnPregnantSomeFemales, v is null"); } if (breedingAllowed) { foreach (CivPopCouple couple in couples) { CivPopKerbal female = couple.GetFemale(); if (female.getAge(now) == CivilianKerbalAge.YOUNG_ADULT || female.getAge(now) == CivilianKerbalAge.ADULT) { if (female.GetExpectingBirthAt() < 0) { if ((rng.Next() % 100) <= CHANCE_OF_PREGNANCY + getTheaterBonus(v)) { female.SetExpectingBirthAt(now + PREGNANCY_DURATION_IN_DAYS * TimeUnit.DAY); } } } } } }
public void turnPregnantSomeFemales( double now, IEnumerable <CivPopCouple> couples, bool breedingAllowed) { if (breedingAllowed) { foreach (CivPopCouple couple in couples) { CivPopKerbal female = couple.GetFemale(); if (female.getAge(now) == CivilianKerbalAge.YOUNG_ADULT || female.getAge(now) == CivilianKerbalAge.ADULT) { if (female.GetExpectingBirthAt() < 0) { if (rng.Next() % CHANCE_OF_PREGNANCY == 0) { female.SetExpectingBirthAt(now + PREGNANCY_DURATION_IN_DAYS * TimeUnit.DAY); } } } } } }