mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Make induced ovulator egg count based on potential pregnancies.
This commit is contained in:
parent
6da6e9388c
commit
bdfbcf1edf
5 changed files with 9 additions and 13 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,5 @@
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
|
using UnityEngine;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
|
||||||
namespace RJW_Menstruation
|
namespace RJW_Menstruation
|
||||||
|
@ -30,21 +31,15 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The maximum theoretical rate of ovulation is inducing the moment it goes follicular and no pregnancies
|
// In an induced ovulator, about 65% of eggs ovulated will become pregnancies, so the expected lifetime supply
|
||||||
// There will be far more eggs than will ever actually be produced, but it fits the induced ovulator philosophy
|
// is the number of pregnancies they could have, with some extra to be sure.
|
||||||
|
// An IUD or a poor fertility mate could run this down quicker. Oh well.
|
||||||
protected override float RaceCyclesPerYear()
|
protected override float RaceCyclesPerYear()
|
||||||
{
|
{
|
||||||
int breedingSeasons = 0;
|
// Don't bother with breeding season, since so much time is planned to be spent pregnant.
|
||||||
if (Props.breedingSeason == SeasonalBreed.Always) breedingSeasons = 4;
|
float pregnanciesPerYear = GenDate.DaysPerYear / Mathf.Max(1, Pawn.def.race.gestationPeriodDays);
|
||||||
else
|
|
||||||
{
|
return 2 * pregnanciesPerYear / Configurations.ImplantationChanceDefault;
|
||||||
if ((Props.breedingSeason & SeasonalBreed.Spring) != 0) breedingSeasons++;
|
|
||||||
if ((Props.breedingSeason & SeasonalBreed.Summer) != 0) breedingSeasons++;
|
|
||||||
if ((Props.breedingSeason & SeasonalBreed.Fall) != 0) breedingSeasons++;
|
|
||||||
if ((Props.breedingSeason & SeasonalBreed.Winter) != 0) breedingSeasons++;
|
|
||||||
}
|
|
||||||
float breedingRatio = breedingSeasons / 4.0f;
|
|
||||||
return breedingRatio * GenDate.DaysPerYear / ((float)(Props.lutealIntervalDays + Props.bleedingIntervalDays) / Configurations.CycleAccelerationDefault);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// There's really no good way to estimate the number of times it's been induced, so this is all we can do
|
// There's really no good way to estimate the number of times it's been induced, so this is all we can do
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
Version 1.0.7.4
|
Version 1.0.7.4
|
||||||
- Fix errors when using mods with bad HediffCompProperties.
|
- Fix errors when using mods with bad HediffCompProperties.
|
||||||
|
- Induced ovulators will start with a lower number of eggs, but reasonably enough for a long breeding life. IUDs or sex with poor fertility partners may result in early menopause.
|
||||||
- Updated max size areola images by wruf.
|
- Updated max size areola images by wruf.
|
||||||
- Title addition on pregnancy removed to match RJW 5.1.0.
|
- Title addition on pregnancy removed to match RJW 5.1.0.
|
||||||
- Improve compatibility with RJW 5.1.0 for multiple wombs.
|
- Improve compatibility with RJW 5.1.0 for multiple wombs.
|
||||||
|
|
Loading…
Reference in a new issue