diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index 2e09816..e3b14e2 100644 Binary files a/1.4/Assemblies/RJW_Menstruation.dll and b/1.4/Assemblies/RJW_Menstruation.dll differ diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs index a7e2918..d67fbb4 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs @@ -1,4 +1,5 @@ using RimWorld; +using RimWorld.Planet; using rjw; using System; using System.Collections.Generic; @@ -218,6 +219,8 @@ namespace RJW_Menstruation } public static Texture2D GetEggIcon(this HediffComp_Menstruation comp, bool includeOvary) { + const float ovaryChanceToShow_01 = 0.4f; + const float ovaryChanceToShow_02 = 1.0f; switch (comp.CurrentVisibleStage) { case HediffComp_Menstruation.Stage.Follicular: @@ -228,15 +231,20 @@ namespace RJW_Menstruation job.Sexprops != null && !job.Sexprops.usedCondom && (job.Sexprops.sexType == xxx.rjwSextype.Vaginal || job.Sexprops.sexType == xxx.rjwSextype.DoublePenetration)) - return ContentFinder.Get("Ovaries/Ovary_01", true); + return ContentFinder.Get((comp.OvulationChance >= ovaryChanceToShow_01) ? "Ovaries/Ovary_01" : "Ovaries_Ovary_00", true); else break; } if (comp.curStageHrs > comp.CurStageIntervalHours - 30) // Approximate time for ovulation to occur - return ContentFinder.Get("Ovaries/Ovary_01", true); + return ContentFinder.Get((comp.OvulationChance >= ovaryChanceToShow_01) ? "Ovaries/Ovary_01" : "Ovaries_Ovary_00", true); else break; case HediffComp_Menstruation.Stage.Ovulatory: if (!includeOvary) break; - return ContentFinder.Get("Ovaries/Ovary_02", true); + if (comp.OvulationChance >= ovaryChanceToShow_02) + return ContentFinder.Get("Ovaries/Ovary_02", true); + else if (comp.OvulationChance >= ovaryChanceToShow_01) + return ContentFinder.Get("Ovaries/Ovary_01", true); + else + return ContentFinder.Get("Ovaries/Ovary_00", true); case HediffComp_Menstruation.Stage.Luteal: if (!comp.IsEggExist) break; int fertstage = comp.IsFertilized;