mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Fix blocking menstruation genes during pawn generation (e.g. colony setup)
This commit is contained in:
parent
80a987b0bd
commit
334ef9d52a
5 changed files with 13 additions and 7 deletions
Binary file not shown.
Binary file not shown.
|
@ -1610,7 +1610,6 @@ namespace RJW_Menstruation
|
|||
eggs.Add(new Egg((int)(EggLifespanHours / CycleFactor)));
|
||||
++ovulated;
|
||||
}
|
||||
|
||||
ovarypower -= ovulated;
|
||||
eggstack = 0;
|
||||
if (Configurations.Debug && ovulated != toOvulate)
|
||||
|
|
|
@ -197,12 +197,18 @@ namespace RJW_Menstruation
|
|||
{
|
||||
public static bool Prefix(ref Gene __result, Gene gene, Pawn ___pawn)
|
||||
{
|
||||
if(VariousDefOf.WombGenes.Contains(gene.def) && !___pawn.GetMenstruationComps().Any())
|
||||
if (!VariousDefOf.WombGenes.Contains(gene.def)) return true;
|
||||
bool keepGene;
|
||||
if (PawnGenerator.IsBeingGenerated(___pawn))
|
||||
{
|
||||
__result = null;
|
||||
return false;
|
||||
// During pawn generation, the vagina hediff doesn't exist yet
|
||||
// So use gender to decide instead
|
||||
// Not the most accurate, but close enough
|
||||
keepGene = ___pawn.gender == Gender.Female;
|
||||
}
|
||||
else return true;
|
||||
else keepGene = ___pawn.GetMenstruationComps().Any();
|
||||
if (!keepGene) __result = null;
|
||||
return keepGene;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Version 1.0.9.0
|
||||
- Menstruation-related genes will now stay on females during initial pawn setup.
|
||||
|
||||
Version 1.0.8.9
|
||||
- Fix bug that sent pawns into menopause very early. Please use the recalculate ovary power dev action to restore lost eggs.
|
||||
|
|
Loading…
Reference in a new issue