Compare commits

...

4 Commits

Author SHA1 Message Date
lutepickle a748a520c0 Properly put periodic ovulators into anestrus after recovering from birth 2024-04-15 21:25:40 -07:00
lutepickle 3cdccbd8cb Replace exact float comparison with Approximately 2024-04-14 21:47:14 -07:00
lutepickle b18bbc3338 Remove unnecessary null conditional 2024-04-14 21:45:06 -07:00
lutepickle b88fab8b8a Update changelog 2024-04-13 15:18:46 -07:00
3 changed files with 10 additions and 2 deletions

View File

@ -1459,7 +1459,7 @@ namespace RJW_Menstruation
break;
case Hediff_BasePregnancy _:
default:
if (Configurations.Debug) Log.Message($"Not adding to existing pregnancy {pregnancy?.GetUniqueLoadID()}");
if (Configurations.Debug) Log.Message($"Not adding to existing pregnancy {pregnancy.GetUniqueLoadID()}");
pregnant = true;
deadeggs.Add(egg);
break;
@ -1480,7 +1480,7 @@ namespace RJW_Menstruation
float interspeciesFactor = InterspeciesImplantFactor(egg.fertilizer);
float implantChance = Configurations.ImplantationChance * ImplantChance * interspeciesFactor;
Log.Message($"Fertilized egg of {Pawn} failed to implant (chance {implantChance.ToStringPercent()}, " +
(interspeciesFactor != 1.0f ? $"interspecies factor {interspeciesFactor.ToStringPercent()}, " : "") +
((!Mathf.Approximately(interspeciesFactor, 1.0f)) ? $"interspecies factor {interspeciesFactor.ToStringPercent()}, " : "") +
$"father {egg.fertilizer})");
}
deadeggs.Add(egg);

View File

@ -92,6 +92,13 @@ namespace RJW_Menstruation
ticksToNextCycle = (int)Utility.VariationRange(averageCycleIntervalTicks, cycleVariability) / 2;
}
protected override void RecoverAction()
{
base.RecoverAction();
if (curStage != Stage.Recover)
GoNextStage(Stage.Anestrus);
}
protected override void AnestrusAction()
{
if (ticksToNextCycle <= 0 && IsBreedingSeason())

View File

@ -1,6 +1,7 @@
Version 1.5.0.0
- Support for RimWorld 1.5. All future changes to Menstruation will only be for RimWorld 1.5.
- Not yet compatible with Animal Genetics. Compatibility will be re-enabled after it is updated for RimWorld 1.5.
- Inactive genes will no longer be applied to wombs.
Version 1.0.9.4
- Added graphics for the menstruation genes with thanks to Alpenglow.