def _GetPregnancyRate() -> float: reproductiveTimeMultiplier = Settings.PregnancySpeed.Get() # type: float pregnancyGuide = CycleGuides.HumanPregnancyGuide.Guide # type: CycleGuides.PregnancyGuide pregnancyTime = pregnancyGuide.PregnancyTime # type: float pregnancyGameTime = ReproductionShared.ReproductiveMinutesToGameMinutes( pregnancyTime, reproductiveTimeMultiplier) # type: float if pregnancyGameTime != 0: pregnancyRate = 100 / pregnancyGameTime # type: float else: Debug.Log( "Calculated a pregnancy game time to be 0 minutes, this is probably not intentional.", This.Mod.Namespace, Debug.LogLevels.Warning, group=This.Mod.Namespace, owner=__name__, lockIdentifier=__name__ + ":" + str(Python.GetLineNumber()), lockThreshold=1) pregnancyRate = 0 return pregnancyRate
def _GetMenstrualCycleMenstruationLength () -> float: reproductiveTimeMultiplier = _GetCycleReproductiveTimeMultiplier() # type: float menstrualCycleGuide = _GetMenstrualCycleGuide() # type: CycleGuides.CycleMenstrualGuide return ReproductionShared.ReproductiveMinutesToGameMinutes(menstrualCycleGuide.MenstruationLength.Mean, reproductiveTimeMultiplier)
def _GetSpermHalfLifeTime () -> float: reproductiveTimeMultiplier = _GetSpermReproductiveTimeMultiplier() # type: float spermGuide = _GetSpermGuide() # type: CycleGuides.SpermGuide return ReproductionShared.ReproductiveMinutesToGameMinutes(spermGuide.LifetimeDistributionMean.Mean, reproductiveTimeMultiplier)
def _GetCycleAge (self, reproductiveTimeSinceCycleStart: float) -> float: # Time in game minutes gameTimeSinceCycleStart = ReproductionShared.ReproductiveMinutesToGameMinutes(reproductiveTimeSinceCycleStart, _GetCycleReproductiveTimeMultiplier()) # type: float return gameTimeSinceCycleStart % _GetMenstrualCycleLifetime()