diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll
index 0215954..5f73187 100644
Binary files a/1.4/Assemblies/RJW_Menstruation.dll and b/1.4/Assemblies/RJW_Menstruation.dll differ
diff --git a/1.4/Defs/GeneDefs/GeneDefs_Menstruation.xml b/1.4/Defs/GeneDefs/GeneDefs_Menstruation.xml
index d430d3f..bc136a5 100644
--- a/1.4/Defs/GeneDefs/GeneDefs_Menstruation.xml
+++ b/1.4/Defs/GeneDefs/GeneDefs_Menstruation.xml
@@ -18,7 +18,6 @@
Menstruation_ShortEggLifetime
Unfertilized eggs with this gene last three-quarters as long.
- UI/Genes/Placeholder
1
10
@@ -27,7 +26,6 @@
Menstruation_DoubleEggLifetime
Unfertilized eggs with this gene last twice as long.
- UI/Genes/Placeholder
-1
12
@@ -36,7 +34,6 @@
Menstruation_QuadEggLifetime
Eggs with this gene last four times as long.
- UI/Genes/Placeholder
-2
1
16
@@ -53,7 +50,6 @@
Menstruation_NeverEstrus
Carriers of this gene will never go into estrus.
- UI/Genes/Placeholder
1
20
@@ -62,7 +58,6 @@
Menstruation_FullEstrus
Carriers of this gene will enter full estrus every menstrual cycle, regardless of vagina type.
- UI/Genes/Placeholder
-1
1
25
@@ -79,7 +74,6 @@
Menstruation_DoubleOvulation
Carriers of this gene will ovulate twice as many eggs.
- UI/Genes/Placeholder
-1
30
@@ -88,7 +82,6 @@
Menstruation_QuadOvulation
Carriers of this gene will ovulate four times as many eggs.
- UI/Genes/Placeholder
-1
35
@@ -98,7 +91,6 @@
Menstruation
Carriers of this gene will not bleed at the end of their cycle.
- UI/Genes/Placeholder
1
40
diff --git a/1.4/Textures/UI/Genes/Placeholder.png b/1.4/Textures/UI/Genes/Placeholder.png
deleted file mode 100644
index deaa2c0..0000000
Binary files a/1.4/Textures/UI/Genes/Placeholder.png and /dev/null differ
diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs
index 070c6ef..cf59be0 100644
--- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs
+++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs
@@ -673,12 +673,12 @@ namespace RJW_Menstruation
if (Pregnancy != null && curStage != Stage.Pregnant)
{
Log.Warning($"{Pawn}'s womb has a pregnancy, but was not in the pregnant stage");
- GoNextStage(Stage.Pregnant);
+ curStage = Stage.Pregnant;
}
BeforeSimulator();
- if (pregnancy == null && (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0 || EggHealth <= 0 || Pawn.SterileGenes())) GoNextStage(Stage.Infertile);
+ if (pregnancy == null && (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0 || EggHealth <= 0 || Pawn.SterileGenes())) curStage = Stage.Infertile;
switch (curStage)
{
case Stage.Follicular:
@@ -1799,7 +1799,7 @@ namespace RJW_Menstruation
return (int)(Props.recoveryIntervalDays * 24 * Rand.Range(0.95f, 1.05f));
case Stage.Pregnant:
return (int)MenstruationUtility.GestationHours(pregnancy);
- default:
+ default: // Often unused
return 1;
}
}
diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs
index b3fa2ac..2daf3a5 100644
--- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs
+++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs
@@ -33,7 +33,7 @@ namespace RJW_Menstruation
// Make the cutoff halfway into cycle, just to be sure there isn't a double-cycle the first time
if ((curStage == Stage.Follicular || curStage == Stage.Luteal || curStage == Stage.Bleeding)
&& (averageCycleIntervalHours - hoursToNextCycle) / 2 >= 24 * (Props.follicularIntervalDays + Props.lutealIntervalDays) / cycleSpeed)
- GoNextStage(Stage.Anestrus);
+ curStage = Stage.Anestrus;
}
}
diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs
index 51b497a..f830211 100644
--- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs
+++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs
@@ -111,7 +111,6 @@ namespace RJW_Menstruation
{
baby.story.headType = firstbaby.story.headType;
baby.story.hairDef = firstbaby.story.hairDef;
- baby.story.HairColor = firstbaby.story.HairColor;
baby.story.bodyType = firstbaby.story.bodyType;
baby.story.furDef = firstbaby.story.furDef;
baby.story.skinColorOverride = firstbaby.story.skinColorOverride;
@@ -166,7 +165,6 @@ namespace RJW_Menstruation
if (baby == null) return PawnGenerator.GeneratePawn(request); // Shouldn't happen
baby.ageTracker.AgeBiologicalTicks = 0;
baby.ageTracker.AgeChronologicalTicks = 0;
- baby.babyNamingDeadline = Find.TickManager.TicksGame + GenDate.TicksPerDay;
if (request.ForceDead) baby.Kill(null, null);
return baby;
}
diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs
index cab288a..2a6d7b8 100644
--- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs
+++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs
@@ -127,7 +127,6 @@ namespace RJW_Menstruation
string label = bestOutcome.label;
string description = bestOutcome.description.Formatted(mother.Named("MOTHER"));
- baby.babyNamingDeadline = Find.TickManager.TicksGame + GenDate.TicksPerDay;
ChoiceLetter_BabyBirth choiceLetter_BabyBirth = (ChoiceLetter_BabyBirth)LetterMaker.MakeLetter(
label, description, LetterDefOf.BabyBirth, baby
);
@@ -352,7 +351,6 @@ namespace RJW_Menstruation
{
baby.story.headType = firstbaby.story.headType;
baby.story.hairDef = firstbaby.story.hairDef;
- baby.story.HairColor = firstbaby.story.HairColor;
baby.story.bodyType = firstbaby.story.bodyType;
baby.story.furDef = firstbaby.story.furDef;
baby.story.skinColorOverride = firstbaby.story.skinColorOverride;
diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs
index 2ffe8b3..8e3f4e9 100644
--- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs
+++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs
@@ -26,10 +26,8 @@ namespace RJW_Menstruation
public static void Postfix(Hediff_Pregnant __instance)
{
HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy();
- if (Configurations.Debug) Log.Message($"{comp.Pawn}'s labor starting, menstruation comp is {comp}");
if (comp == null) return;
comp.Pregnancy = __instance.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PregnancyLabor);
- if (Configurations.Debug) Log.Message($"New pregnancy Hediff is {comp.Pregnancy}");
}
}
@@ -39,10 +37,8 @@ namespace RJW_Menstruation
public static void PostFix(Hediff_Labor __instance)
{
HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy();
- if (Configurations.Debug) Log.Message($"{comp.Pawn}'s initial labor ending, menstruation comp is {comp}");
if (comp == null) return;
comp.Pregnancy = __instance.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PregnancyLaborPushing);
- if (Configurations.Debug) Log.Message($"New pregnancy Hediff is {comp.Pregnancy}");
}
}
@@ -52,7 +48,6 @@ namespace RJW_Menstruation
public static void PostFix(Hediff_LaborPushing __instance)
{
HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy();
- if (Configurations.Debug) Log.Message($"{comp.Pawn}'s labor pushing ending, menstruation comp is {comp}");
if (comp == null) return;
comp.Pregnancy = null;
}
@@ -220,28 +215,4 @@ namespace RJW_Menstruation
comp.Notify_UpdatedGenes();
}
}
-
- //[HarmonyPatch(typeof(ChildcareUtility), nameof(ChildcareUtility.SuckleFromLactatingPawn))]
- //public class GreedyConsume_Patch
- //{
- // private static float ConsumeAndAdjustNipples(HediffComp_Chargeable instance, float desiredCharge)
- // {
- // // Pulling breast comp every tick might be too much for performance.
- // const float averageNippleChangePerTick = 0.0025f / 50000f;
- // instance.Pawn.GetBreastComp()?.AdjustNippleProgress(Rand.Range(0.0f, averageNippleChangePerTick * 2) * Configurations.MaxBreastIncrementFactor);
- // return instance.GreedyConsume(desiredCharge);
- // }
-
- // private static readonly MethodInfo GreedyConsume = AccessTools.Method(typeof(HediffComp_Chargeable), nameof(HediffComp_Chargeable.GreedyConsume), new Type[] { typeof(HediffComp_Chargeable), typeof(float) });
- // public static IEnumerable Transpiler(IEnumerable instructions)
- // {
- // if(GreedyConsume == null) throw new InvalidOperationException("GreedyConsume not found");
- // foreach (var instruction in instructions)
- // {
- // if (instruction.Calls(GreedyConsume))
- // yield return CodeInstruction.Call(typeof(GreedyConsume_Patch), nameof(GreedyConsume_Patch.ConsumeAndAdjustNipples));
- // yield return instruction;
- // }
- // }
- //}
}
\ No newline at end of file
diff --git a/changelogs.txt b/changelogs.txt
index 78e5725..fc1e583 100644
--- a/changelogs.txt
+++ b/changelogs.txt
@@ -1,8 +1,7 @@
Version 1.0.8.6
- Updated Traditional Chinese translation by Hydrogen.
- Fix error when trying to terminate a non-Biotech pregnancy.
- - Properly give the opportunity to name a newborn with Biotech and multiple pregnancy.
- - Added several menstruation-related genes, with a placeholder graphic for now.
+ - Added several menstruation-related genes.
- Added experimental support for twins and hybrids with Biotech pregnancies, disabled by default.
Version 1.0.8.5