mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
2 commits
e6d2446376
...
334ef9d52a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
334ef9d52a | ||
|
|
80a987b0bd |
6 changed files with 16 additions and 9 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -1610,8 +1610,6 @@ namespace RJW_Menstruation
|
||||||
eggs.Add(new Egg((int)(EggLifespanHours / CycleFactor)));
|
eggs.Add(new Egg((int)(EggLifespanHours / CycleFactor)));
|
||||||
++ovulated;
|
++ovulated;
|
||||||
}
|
}
|
||||||
if(ovulated > ovarypower) ovulated = Math.Min(ovarypower, eggstack);
|
|
||||||
|
|
||||||
ovarypower -= ovulated;
|
ovarypower -= ovulated;
|
||||||
eggstack = 0;
|
eggstack = 0;
|
||||||
if (Configurations.Debug && ovulated != toOvulate)
|
if (Configurations.Debug && ovulated != toOvulate)
|
||||||
|
|
|
||||||
|
|
@ -192,21 +192,27 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(typeof(Pawn_GeneTracker), "AddGene", new Type[] {typeof(Gene), typeof(bool)})]
|
[HarmonyPatch(typeof(Pawn_GeneTracker), "AddGene", new Type[] { typeof(Gene), typeof(bool) })]
|
||||||
public class AddGene_Patch
|
public class AddGene_Patch
|
||||||
{
|
{
|
||||||
public static bool Prefix(ref Gene __result, Gene gene, Pawn ___pawn)
|
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;
|
// During pawn generation, the vagina hediff doesn't exist yet
|
||||||
return false;
|
// 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(typeof(Pawn_GeneTracker), "Notify_GenesChanged")]
|
[HarmonyPatch(typeof(Pawn_GeneTracker), "Notify_GenesChanged")]
|
||||||
public class Notify_GenesChanged_Patch
|
public class Notify_GenesChanged_Patch
|
||||||
{
|
{
|
||||||
public static void Postfix(Pawn_GeneTracker __instance)
|
public static void Postfix(Pawn_GeneTracker __instance)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
<identifier>RJW Menstruation</identifier>
|
<identifier>RJW Menstruation</identifier>
|
||||||
<version>1.0.8.9</version>
|
<version>1.0.9.0</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<incompatibleWith />
|
<incompatibleWith />
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
Version 1.0.9.0
|
||||||
|
- Menstruation-related genes will now stay on females during initial pawn setup.
|
||||||
|
|
||||||
Version 1.0.8.9
|
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.
|
- Fix bug that sent pawns into menopause very early. Please use the recalculate ovary power dev action to restore lost eggs.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue