diff --git a/1.3/Assemblies/RJW_Menstruation.dll b/1.3/Assemblies/RJW_Menstruation.dll
index 4eea884..230fe1a 100644
Binary files a/1.3/Assemblies/RJW_Menstruation.dll and b/1.3/Assemblies/RJW_Menstruation.dll differ
diff --git a/1.3/MilkModule/Assemblies/MilkModule.dll b/1.3/MilkModule/Assemblies/MilkModule.dll
index 7fa652c..9b9615a 100644
Binary files a/1.3/MilkModule/Assemblies/MilkModule.dll and b/1.3/MilkModule/Assemblies/MilkModule.dll differ
diff --git a/1.3/SexperienceModule/Assemblies/SexperienceModule.dll b/1.3/SexperienceModule/Assemblies/SexperienceModule.dll
index 1ca42db..55382de 100644
Binary files a/1.3/SexperienceModule/Assemblies/SexperienceModule.dll and b/1.3/SexperienceModule/Assemblies/SexperienceModule.dll differ
diff --git a/1.3/source/RJW_Menstruation/MilkModule/MilkModule.csproj b/1.3/source/RJW_Menstruation/MilkModule/MilkModule.csproj
index e8ce3c1..b8a0004 100644
--- a/1.3/source/RJW_Menstruation/MilkModule/MilkModule.csproj
+++ b/1.3/source/RJW_Menstruation/MilkModule/MilkModule.csproj
@@ -31,10 +31,6 @@
4
-
- ..\..\..\..\..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll
- False
-
..\..\..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll
False
@@ -96,5 +92,11 @@
False
+
+
+ 2.1.1
+ runtime
+
+
\ No newline at end of file
diff --git a/1.3/source/RJW_Menstruation/MilkModule/packages.config b/1.3/source/RJW_Menstruation/MilkModule/packages.config
index 6fa11be..3299dfc 100644
--- a/1.3/source/RJW_Menstruation/MilkModule/packages.config
+++ b/1.3/source/RJW_Menstruation/MilkModule/packages.config
@@ -1,4 +1,2 @@
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs
index 2ae40fa..a33554e 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs
@@ -969,20 +969,20 @@ namespace RJW_Menstruation
{
if (Configurations.EnableAnimalCycle)
{
- HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), tickInterval, parent.pawn, false);
+ HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), GetNextUpdate(), parent.pawn, false);
}
}
else
{
- if (pregnancy == null && parent.pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(Stage.Young), tickInterval, parent.pawn, false);
- else HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), tickInterval, parent.pawn, false);
+ if (pregnancy == null && parent.pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(Stage.Young), GetNextUpdate(), parent.pawn, false);
+ else HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), GetNextUpdate(), parent.pawn, false);
}
}
else
{
if (cums == null) cums = new List();
curStage = Stage.None;
- HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), tickInterval, parent.pawn, false);
+ HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), GetNextUpdate(), parent.pawn, false);
}
//Log.Message(parent.pawn.Label + " - Initialized menstruation comp");
loaded = true;
@@ -1159,6 +1159,11 @@ namespace RJW_Menstruation
foreach (Egg egg in eggs)
{
if (!egg.fertilized || egg.fertstage < 168) continue;
+ else if (egg.fertilizer is null)
+ {
+ deadeggs.Add(egg);
+ continue;
+ }
else if (Rand.Range(0.0f, 1.0f) <= Configurations.ImplantationChance * ImplantFactor * InterspeciesImplantFactor(egg.fertilizer))
{
Hediff_BasePregnancy pregnancy = parent.pawn.GetRJWPregnancy();
@@ -1520,7 +1525,7 @@ namespace RJW_Menstruation
{
StayCurrentStageConst(Stage.Young);
}
- else GoNextStage(Stage.Follicular);
+ else GoNextStage(IsBreedingSeason() ? Stage.Follicular : Stage.Anestrus);
}
protected virtual void ClimactericFollicularAction()
@@ -1738,7 +1743,7 @@ namespace RJW_Menstruation
curStage = Stage.Follicular;
curStageHrs = 0;
if (follicularIntervalhours < 0) follicularIntervalhours = PeriodRandomizer(Props.folicularIntervalDays * 24, Props.deviationFactor);
- HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(Stage.Follicular), tickInterval, parent.pawn, false);
+ HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(Stage.Follicular), GetNextUpdate(), parent.pawn, false);
break;
}
action += delegate
@@ -1757,31 +1762,41 @@ namespace RJW_Menstruation
}
- protected void GoNextStage(Stage nextstage, float factor = 1.0f)
+ protected int GetNextUpdate()
+ {
+ // Ticks past the hour. Will be equal except for game start or load
+ int currentOffset = Find.TickManager.TicksGame % tickInterval;
+ int nextOffset = (parent.pawn.HashOffset() % tickInterval + tickInterval) % tickInterval; // Messy, but HashOffset is negative a lot
+
+ // The -1/+1 to ensure that equality works out to 1 hour and not 0 ticks
+ return ((nextOffset - currentOffset + tickInterval - 1) % tickInterval) + 1;
+ }
+
+ protected void GoNextStage(Stage nextstage)
{
curStageHrs = 0;
curStage = nextstage;
- HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(nextstage), (int)(tickInterval * factor), parent.pawn, false);
+ HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(nextstage), GetNextUpdate(), parent.pawn, false);
}
- protected void GoNextStageSetHour(Stage nextstage, int hour, float factor = 1.0f)
+ protected void GoNextStageSetHour(Stage nextstage, int hour)
{
curStageHrs = hour;
curStage = nextstage;
- HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(nextstage), (int)(tickInterval * factor), parent.pawn, false);
+ HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(nextstage), GetNextUpdate(), parent.pawn, false);
}
//stage can be interrupted in other reasons
- protected void StayCurrentStage(float factor = 1.0f)
+ protected void StayCurrentStage()
{
- HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), (int)(tickInterval * factor), parent.pawn, false);
+ HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), GetNextUpdate(), parent.pawn, false);
}
//stage never changes
- protected void StayCurrentStageConst(Stage curstage, float factor = 1.0f)
+ protected void StayCurrentStageConst(Stage curstage)
{
- HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curstage), (int)(tickInterval * factor), parent.pawn, false);
+ HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curstage), GetNextUpdate(), parent.pawn, false);
}
protected void GoFollicularOrBleeding()
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs
index 2a6601e..c988cfc 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs
@@ -157,8 +157,8 @@ namespace RJW_Menstruation
}
public static Texture2D GetEggIcon(this HediffComp_Menstruation comp, bool includeOvary)
{
- if (comp.parent.pawn.IsPregnant(Configurations.InfoDetail != Configurations.DetailLevel.All))
- {
+ if (comp.parent.pawn.IsPregnant(Configurations.InfoDetail != Configurations.DetailLevel.All) && !(PregnancyHelper.GetPregnancy(comp.parent.pawn) is Hediff_MechanoidPregnancy))
+ {
if (comp.parent.pawn.GetPregnancyProgress() < 0.2f) return ContentFinder.Get("Eggs/Egg_Implanted00", true);
else return ContentFinder.Get("Womb/Empty", true);
}
@@ -181,8 +181,8 @@ namespace RJW_Menstruation
int fertstage = comp.IsFertilized;
if (fertstage >= 0)
{
- if (fertstage <= comp.CycleFactor) return ContentFinder.Get("Eggs/Egg_Fertilizing02", true);
- if (fertstage <= 18) return ContentFinder.Get("Eggs/Egg_Fertilized00", true);
+ if (fertstage <= Configurations.CycleAcceleration) return ContentFinder.Get("Eggs/Egg_Fertilizing02", true);
+ else if (fertstage <= 18) return ContentFinder.Get("Eggs/Egg_Fertilized00", true);
else if (fertstage <= 54) return ContentFinder.Get("Eggs/Egg_Fertilized01", true);
else return ContentFinder.Get("Eggs/Egg_Fertilized02", true);
}
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs
index 1e0b9ca..73521e2 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs
@@ -423,7 +423,7 @@ namespace RJW_Menstruation
Pawn baby = PawnGenerator.GeneratePawn(request);
if (baby != null)
{
- if (xxx.is_human(baby))
+ if (xxx.is_human(baby) || (baby.relations != null && !RJWSettings.Disable_bestiality_pregnancy_relations))
{
baby.SetMother(mother);
if (mother != father)
@@ -434,23 +434,15 @@ namespace RJW_Menstruation
baby.relations.AddDirectRelation(PawnRelationDefOf.Parent, father);
}
}
-
+ }
+ if (xxx.is_human(baby))
+ {
// Ensure the same inherited traits are chosen each run
// Has to happen right here so GeneratePawn up there still gets unique results
Rand.PushState(traitSeed); // With a seed just to make sure that fraternal twins *don't* get trait-duped
UpdateTraits(baby, parentTraits);
Rand.PopState();
}
- else if (baby.relations != null && !RJWSettings.Disable_bestiality_pregnancy_relations)
- {
- baby.relations.AddDirectRelation(VariousDefOf.Relation_birthgiver, mother);
- mother.relations.AddDirectRelation(VariousDefOf.Relation_spawn, baby);
- if (mother != father)
- {
- baby.relations.AddDirectRelation(VariousDefOf.Relation_birthgiver, father);
- father.relations.AddDirectRelation(VariousDefOf.Relation_spawn, baby);
- }
- }
}
else Log.Error("Baby not generated. Request: " + request.ToString());
return baby;
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/GC_Patch.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/GC_Patch.cs
index 4e53b90..82a2bf0 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/GC_Patch.cs
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/GC_Patch.cs
@@ -21,7 +21,7 @@ namespace RJW_Menstruation.Patch
}
[HarmonyPatch(typeof(WorldPawnGC), "AccumulatePawnGCData")]
- public static class PawnGCPass_Patch
+ public static class AccumulatePawnGCData_Patch
{
public static void Prefix()
{
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs
index ccfa500..260937c 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs
@@ -89,7 +89,7 @@ namespace RJW_Menstruation
public const float buttonWidth = 50f;
public const float buttonHeight = 20f;
- private static HediffComp_Menstruation GetFirstMenstruation(IEnumerable diffs, float rectWidth)
+ private static HediffComp_Menstruation GetFirstMenstruation(IEnumerable diffs)
{
foreach (Hediff diff in diffs)
{
@@ -103,7 +103,7 @@ namespace RJW_Menstruation
{
if (Configurations.EnableButtonInHT && pawn.ShowStatus())
{
- HediffComp_Menstruation comp = GetFirstMenstruation(diffs, rect.width * 0.625f);
+ HediffComp_Menstruation comp = GetFirstMenstruation(diffs);
if (comp != null)
{
Rect buttonrect = new Rect((rect.xMax) / 2 - 5f, curY + 2f, buttonWidth, buttonHeight);
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs
index 9da6fff..887f6b8 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs
@@ -39,7 +39,7 @@ namespace RJW_Menstruation
}
else if (Genital_Helper.has_ovipositorM(pawn, pawnparts))
{
- comp.CumIn(pawn, Rand.Range(0.5f, 3.0f) * pawn.BodySize, 1.0f);
+ comp.CumIn(pawn, Rand.Range(0.75f, 4.5f) * pawn.BodySize, 1.0f);
}
else comp.CumIn(pawn, pawn.GetCumVolume(pawnparts), 0);
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj b/1.3/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj
index daab8e1..7efb672 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj
@@ -89,10 +89,6 @@
-
- ..\..\..\..\..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll
- False
-
..\..\..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll
False
@@ -159,5 +155,11 @@
false
+
+
+ 2.1.1
+ runtime
+
+
\ No newline at end of file
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/Things.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/Things.cs
index ef1f0fa..324f428 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/Things.cs
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/Things.cs
@@ -102,7 +102,7 @@ namespace RJW_Menstruation
{
get
{
- return thingDefName?.Length < 1;
+ return (thingDefName?.Length ?? 0) < 1;
}
}
public ThingDef GetDef
@@ -131,7 +131,7 @@ namespace RJW_Menstruation
if (hybridExtension.NullOrEmpty()) return null;
else
{
- return hybridExtension.Find(x => x.GetDef.defName?.Equals(race) ?? false);
+ return hybridExtension.Find(x => x.GetDef?.defName?.Equals(race) ?? false);
}
}
@@ -165,7 +165,7 @@ namespace RJW_Menstruation
{
get
{
- return thingDefName?.Length < 1;
+ return (thingDefName?.Length ?? 0) < 1;
}
}
public ThingDef GetDef
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs
index cb1faee..40ac6df 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/VariousDefOf.cs
@@ -22,6 +22,7 @@ namespace RJW_Menstruation
public static readonly HediffDef Hediff_Estrus_Concealed = DefDatabase.GetNamed("Hediff_Estrus_Concealed");
public static readonly HediffDef Hediff_ASA = DefDatabase.GetNamed("Hediff_ASA");
public static readonly StatDef MaxAbsorbable = DefDatabase.GetNamed("MaxAbsorbable");
+ // Obsolete, kept for compatibility for now
public static readonly PawnRelationDef Relation_birthgiver = DefDatabase.AllDefs.FirstOrDefault(d => d.defName == "RJW_Sire");
public static readonly PawnRelationDef Relation_spawn = DefDatabase.AllDefs.FirstOrDefault(d => d.defName == "RJW_Pup");
public static readonly NeedDef SexNeed = DefDatabase.GetNamed("Sex");
diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/packages.config b/1.3/source/RJW_Menstruation/RJW_Menstruation/packages.config
index 6fa11be..3299dfc 100644
--- a/1.3/source/RJW_Menstruation/RJW_Menstruation/packages.config
+++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/packages.config
@@ -1,4 +1,2 @@
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/1.3/source/RJW_Menstruation/SexperienceModule/SexperienceModule.csproj b/1.3/source/RJW_Menstruation/SexperienceModule/SexperienceModule.csproj
index a65b5a3..71e0d9f 100644
--- a/1.3/source/RJW_Menstruation/SexperienceModule/SexperienceModule.csproj
+++ b/1.3/source/RJW_Menstruation/SexperienceModule/SexperienceModule.csproj
@@ -31,10 +31,6 @@
4
-
- ..\..\..\..\..\..\..\..\workshop\content\294100\1127530465\1.3\Assemblies\0Harmony.dll
- False
-
..\..\..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll
False
@@ -111,5 +107,11 @@
+
+
+ 2.2.1
+ runtime
+
+
\ No newline at end of file
diff --git a/About/Manifest.xml b/About/Manifest.xml
index d092e2e..21cc793 100644
--- a/About/Manifest.xml
+++ b/About/Manifest.xml
@@ -1,7 +1,7 @@
RJW Menstruation
- 1.0.6.5
+ 1.0.6.6
diff --git a/changelogs.txt b/changelogs.txt
index 2663dbc..9134a88 100644
--- a/changelogs.txt
+++ b/changelogs.txt
@@ -1,3 +1,11 @@
+Version 1.0.6.6
+ - Ovipostors add on average 1.5x as much cum to a womb than before.
+ - The womb tick timing is now more consistent across a save and load, and also spread out across pawns.
+ - Babies of bestial relations get a mother/father relationship to their parents instead of the old sire one.
+ - Fix error when an egg fertilized by a nonexistent/garbage collected pawn (e.g. in an NPC's womb) tries to implant.
+ - Another hybrid fix for invalid races.
+ - Fix an implanted egg icon showing for mechanoid pregnancies.
+
Version 1.0.6.5
- Handle climacteric induced ovulators a bit better.
- Compatibility update for Sexperience 1.0.4.2