예제 #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
예제 #2
0
파일: Dot.py 프로젝트: NeonOcean/S4.Cycle
def _GetMenstrualCycleMenstruationLength () -> float:
	reproductiveTimeMultiplier = _GetCycleReproductiveTimeMultiplier()  # type: float
	menstrualCycleGuide = _GetMenstrualCycleGuide()  # type: CycleGuides.CycleMenstrualGuide
	return ReproductionShared.ReproductiveMinutesToGameMinutes(menstrualCycleGuide.MenstruationLength.Mean, reproductiveTimeMultiplier)
예제 #3
0
파일: Dot.py 프로젝트: NeonOcean/S4.Cycle
def _GetSpermHalfLifeTime () -> float:
	reproductiveTimeMultiplier = _GetSpermReproductiveTimeMultiplier()  # type: float
	spermGuide = _GetSpermGuide()  # type: CycleGuides.SpermGuide
	return ReproductionShared.ReproductiveMinutesToGameMinutes(spermGuide.LifetimeDistributionMean.Mean, reproductiveTimeMultiplier)
예제 #4
0
파일: Dot.py 프로젝트: NeonOcean/S4.Cycle
	def _GetCycleAge (self, reproductiveTimeSinceCycleStart: float) -> float: # Time in game minutes
		gameTimeSinceCycleStart = ReproductionShared.ReproductiveMinutesToGameMinutes(reproductiveTimeSinceCycleStart, _GetCycleReproductiveTimeMultiplier())  # type: float
		return gameTimeSinceCycleStart % _GetMenstrualCycleLifetime()