Esempio n. 1
0
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
Esempio n. 2
0
def _GetMenstrualCycleMenstruationLength () -> float:
	reproductiveTimeMultiplier = _GetCycleReproductiveTimeMultiplier()  # type: float
	menstrualCycleGuide = _GetMenstrualCycleGuide()  # type: CycleGuides.CycleMenstrualGuide
	return ReproductionShared.ReproductiveMinutesToGameMinutes(menstrualCycleGuide.MenstruationLength.Mean, reproductiveTimeMultiplier)
Esempio n. 3
0
def _GetSpermHalfLifeTime () -> float:
	reproductiveTimeMultiplier = _GetSpermReproductiveTimeMultiplier()  # type: float
	spermGuide = _GetSpermGuide()  # type: CycleGuides.SpermGuide
	return ReproductionShared.ReproductiveMinutesToGameMinutes(spermGuide.LifetimeDistributionMean.Mean, reproductiveTimeMultiplier)
Esempio n. 4
0
	def _GetCycleAge (self, reproductiveTimeSinceCycleStart: float) -> float: # Time in game minutes
		gameTimeSinceCycleStart = ReproductionShared.ReproductiveMinutesToGameMinutes(reproductiveTimeSinceCycleStart, _GetCycleReproductiveTimeMultiplier())  # type: float
		return gameTimeSinceCycleStart % _GetMenstrualCycleLifetime()