mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Display ovaries at a lower state when ovulation chance is lower
This commit is contained in:
parent
2bb0871919
commit
1aaaf50b64
2 changed files with 11 additions and 3 deletions
Binary file not shown.
|
@ -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<Texture2D>.Get("Ovaries/Ovary_01", true);
|
||||
return ContentFinder<Texture2D>.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<Texture2D>.Get("Ovaries/Ovary_01", true);
|
||||
return ContentFinder<Texture2D>.Get((comp.OvulationChance >= ovaryChanceToShow_01) ? "Ovaries/Ovary_01" : "Ovaries_Ovary_00", true);
|
||||
else break;
|
||||
case HediffComp_Menstruation.Stage.Ovulatory:
|
||||
if (!includeOvary) break;
|
||||
return ContentFinder<Texture2D>.Get("Ovaries/Ovary_02", true);
|
||||
if (comp.OvulationChance >= ovaryChanceToShow_02)
|
||||
return ContentFinder<Texture2D>.Get("Ovaries/Ovary_02", true);
|
||||
else if (comp.OvulationChance >= ovaryChanceToShow_01)
|
||||
return ContentFinder<Texture2D>.Get("Ovaries/Ovary_01", true);
|
||||
else
|
||||
return ContentFinder<Texture2D>.Get("Ovaries/Ovary_00", true);
|
||||
case HediffComp_Menstruation.Stage.Luteal:
|
||||
if (!comp.IsEggExist) break;
|
||||
int fertstage = comp.IsFertilized;
|
||||
|
|
Loading…
Reference in a new issue