diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index ae8c52b..ad2bc84 100644 Binary files a/1.4/Assemblies/RJW_Menstruation.dll and b/1.4/Assemblies/RJW_Menstruation.dll differ diff --git a/1.4/Languages/English/Keyed/RJW_Menstruation.xml b/1.4/Languages/English/Keyed/RJW_Menstruation.xml index d8d471e..e428696 100644 --- a/1.4/Languages/English/Keyed/RJW_Menstruation.xml +++ b/1.4/Languages/English/Keyed/RJW_Menstruation.xml @@ -45,7 +45,7 @@ Enable womb icon Enable button in health tab Enable animal cycle - Simulate animal cycles. Not recommended. + Simulate animal cycles. This option will apply after next load Not recommended. Implantation chance Base implantation chance of fertilized egg This value affects the chance of impregnation. Fertilization chance @@ -68,7 +68,7 @@ Show only image of a fetus after discovered pregnancy. Do not show any information about a fetus. Enable menopause - Enable menopause effect that makes pawn infertile in time progress If you have problems with long life races, turn off this option. + Enable menopause effect that makes pawn infertile in time progress If you have problems with long life races, turn off this option. This option will apply after save loaded. Use multiple pregnancy Use multiple pregnancy instead RJW's default pregnancy Disable this option if you are in trouble with impregnation RJW pregnancy should be turned on. Enable hetero ovular twins @@ -121,9 +121,6 @@ Estimated sperm lifespan Estimated egg lifespan Implantation chance of fertilized eggs. Chance of fertilization this hour: {0}% - Use basic RJW pregnancy - Use menstruation multiple pregnancy - Use Biotech pregnancy Reset to default Gather cum diff --git a/1.4/MilkModule/Assemblies/MilkModule.dll b/1.4/MilkModule/Assemblies/MilkModule.dll index 7c22131..c91f14d 100644 Binary files a/1.4/MilkModule/Assemblies/MilkModule.dll and b/1.4/MilkModule/Assemblies/MilkModule.dll differ diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs index 94daadc..31cfe5d 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs @@ -53,7 +53,7 @@ namespace RJW_Menstruation public static float EstrusFuckabilityToHookup = RJWHookupSettings.MinimumFuckabilityToHookup; public static float EstrusAttractivenessToHookup = RJWHookupSettings.MinimumAttractivenessToHookup; public static float EstrusRelationshipToHookup = RJWHookupSettings.MinimumRelationshipToHookup; - public static PregnancyType PregnancySource = PregnancyType.MultiplePregnancy; + public static bool UseMultiplePregnancy = true; public static bool EnableHeteroOvularTwins = true; public static bool EnableEnzygoticTwins = true; public static float EnzygoticTwinsChance = EnzygoticTwinsChanceDefault; @@ -89,7 +89,7 @@ namespace RJW_Menstruation EnzygoticTwinsChanceAdjust = EnzygoticTwinsChanceAdjustDefault; EnableEnzygoticTwins = true; EnableHeteroOvularTwins = true; - PregnancySource = PregnancyType.MultiplePregnancy; + UseMultiplePregnancy = true; MaxEnzygoticTwins = MaxEnzygoticTwinsDefault; BleedingAmount = BleedingAmountDefault; MotherFirst = false; @@ -166,13 +166,6 @@ namespace RJW_Menstruation Hostile = 16 } - public enum PregnancyType - { - BaseRJW, - MultiplePregnancy, - Biotech - } - public override void ExposeData() { Scribe_Values.Look(ref ImplantationChanceAdjust, "ImplantationChanceAdjust", ImplantationChanceAdjust, true); @@ -196,7 +189,7 @@ namespace RJW_Menstruation Scribe_Values.Look(ref EstrusFuckabilityToHookup, "EstrusFuckabilityToHookup", EstrusFuckabilityToHookup, true); Scribe_Values.Look(ref EstrusAttractivenessToHookup, "EstrusAttractivenessToHookup", EstrusAttractivenessToHookup, true); Scribe_Values.Look(ref EstrusRelationshipToHookup, "EstrusRelationshipToHookup", EstrusRelationshipToHookup, true); - Scribe_Values.Look(ref PregnancySource, "PregnancySource", PregnancySource, true); + Scribe_Values.Look(ref UseMultiplePregnancy, "UseMultiplePregnancy", UseMultiplePregnancy, true); Scribe_Values.Look(ref EnableHeteroOvularTwins, "EnableHeteroOvularTwins", EnableHeteroOvularTwins, true); Scribe_Values.Look(ref EnableEnzygoticTwins, "EnableEnzygoticTwins", EnableEnzygoticTwins, true); Scribe_Values.Look(ref EnzygoticTwinsChance, "EnzygoticTwinsChance", EnzygoticTwinsChance, true); @@ -252,10 +245,8 @@ namespace RJW_Menstruation public RJW_Menstruation(ModContentPack content) : base(content) { GetSettings(); - if (!ModsConfig.BiotechActive && Configurations.PregnancySource == Configurations.PregnancyType.Biotech) - Configurations.PregnancySource = Configurations.PregnancyType.MultiplePregnancy; - Configurations.HARActivated = ModsConfig.IsActive("erdelf.HumanoidAlienRaces"); - Configurations.AnimalGeneticsActivated = ModsConfig.IsActive("Mlie.AnimalGenetics"); + Configurations.HARActivated = ModLister.GetActiveModWithIdentifier("erdelf.HumanoidAlienRaces") != null; + Configurations.AnimalGeneticsActivated = ModLister.GetActiveModWithIdentifier("Mlie.AnimalGenetics") != null; } @@ -271,8 +262,7 @@ namespace RJW_Menstruation float mainRectHeight = -3f + (Configurations.EnableWombIcon || Configurations.EnableButtonInHT ? 400f : 0f) + (Configurations.EstrusOverridesHookupSettings ? 144f : 0f) + - // TODO: Also for modified Biotech pregnancies - (Configurations.PregnancySource == Configurations.PregnancyType.MultiplePregnancy ? (Configurations.EnableEnzygoticTwins ? 175f : 75f) : 0f) + + (Configurations.UseMultiplePregnancy ? (Configurations.EnableEnzygoticTwins ? 175f : 75f) : 0f) + (Configurations.EnableBirthVaginaMorph ? 48f : 0f); Rect mainRect = new Rect(0f, 0f, inRect.width - 30f, Math.Max(inRect.height + mainRectHeight, 1f)); int Adjust; @@ -425,14 +415,8 @@ namespace RJW_Menstruation Configurations.EstrusRelationshipToHookup = listmain.Slider((int)Configurations.EstrusRelationshipToHookup, -100f, 100f); } - if (listmain.RadioButton(Translations.Option_PregnancyFromBaseRJW_Label, Configurations.PregnancySource == Configurations.PregnancyType.BaseRJW)) - Configurations.PregnancySource = Configurations.PregnancyType.BaseRJW; - if (listmain.RadioButton(Translations.Option_PregnancyFromMultiplePregnancy_Label, Configurations.PregnancySource == Configurations.PregnancyType.MultiplePregnancy)) - Configurations.PregnancySource = Configurations.PregnancyType.MultiplePregnancy; - if (ModsConfig.BiotechActive && listmain.RadioButton(Translations.Option_PregnancyFromBiotech_Label, Configurations.PregnancySource == Configurations.PregnancyType.Biotech)) - Configurations.PregnancySource = Configurations.PregnancyType.Biotech; - // TODO: Also for modified Biotech pregnancy - if (Configurations.PregnancySource == Configurations.PregnancyType.MultiplePregnancy) + listmain.CheckboxLabeled(Translations.Option13_Label, ref Configurations.UseMultiplePregnancy, Translations.Option13_Desc); + if (Configurations.UseMultiplePregnancy) { float sectionheight = 75f; if (Configurations.EnableEnzygoticTwins) sectionheight += 100; @@ -475,14 +459,19 @@ namespace RJW_Menstruation listmain.EndSection(vmsection); } + + Widgets.EndScrollView(); + listmain.CheckboxLabeled(Translations.Option8_Label, ref Configurations.Debug, Translations.Option8_Desc); if (listmain.ButtonText(Translations.Button_ResetToDefault)) { Configurations.SettoDefault(); + } listmain.End(); - Widgets.EndScrollView(); + + } diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_InducedOvulator.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_InducedOvulator.cs index 55b7ecf..a1ab09a 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_InducedOvulator.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_InducedOvulator.cs @@ -67,7 +67,7 @@ namespace RJW_Menstruation { get { - if (Pawn.HasIUD()) return false; + if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false; switch (curStage) { 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 29b54cc..4ebd3b4 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 @@ -166,7 +166,7 @@ namespace RJW_Menstruation { get { - if (opcache > 0) return opcache; + if (opcache >= 0) return opcache; float avglittersize; try { @@ -182,7 +182,6 @@ namespace RJW_Menstruation avglittersize * yearsBeforeMenopause * (Pawn.def.race.lifeExpectancy / ThingDefOf.Human.race.lifeExpectancy)); - if (opcache == 0) opcache = 1; return opcache; } } @@ -194,7 +193,7 @@ namespace RJW_Menstruation { get { - if (!Configurations.EnableMenopause || Props.infertile) return Mathf.Max(1.0f, ovarypower / OvaryPowerThreshold); + if (!Configurations.EnableMenopause || Props.infertile) return Mathf.Min(1.0f, ovarypower / OvaryPowerThreshold); else return ovarypower / OvaryPowerThreshold; } } @@ -472,7 +471,7 @@ namespace RJW_Menstruation { get { - if (Pawn.HasIUD()) return false; + if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false; switch (curStage) { @@ -639,7 +638,7 @@ namespace RJW_Menstruation CumOut(); - if (pregnancy == null && (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0 || EggHealth <= 0 || Pawn.SterileGenes())) curStage = Stage.Infertile; + if (pregnancy == null && (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) || EggHealth <= 0) curStage = Stage.Infertile; switch (curStage) { case Stage.Follicular: @@ -739,7 +738,7 @@ namespace RJW_Menstruation public void CumIn(Pawn pawn, float volume, float fertility = 1.0f, ThingDef filthdef = null) { if (volume <= 0) return; - if (Pawn.HasIUD()) fertility /= 100f; + if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) fertility /= 100f; float cumd = TotalCumPercent; float tmp = TotalCum + volume; if (tmp > CumCapacity) @@ -852,7 +851,7 @@ namespace RJW_Menstruation Hediff asa = Pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_ASA); float asafactor = asa?.Severity ?? 0f; - if (Pawn.HasIUD()) antisperm = 0.70f + asafactor; + if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) antisperm = 0.70f + asafactor; else antisperm = 0.0f + asafactor; absorber = (Absorber)Pawn.apparel?.WornApparel?.Find(x => x is Absorber); @@ -1235,8 +1234,7 @@ namespace RJW_Menstruation if (Configurations.Debug) Log.Message($"Implanting fertilized egg of {Pawn} into {parent}, father {egg.fertilizer}"); if (pregnancy != null) { - // TODO: Modified Biotech pregnancy - if (Configurations.PregnancySource == Configurations.PregnancyType.MultiplePregnancy && Configurations.EnableHeteroOvularTwins) + if (Configurations.UseMultiplePregnancy && Configurations.EnableHeteroOvularTwins) { if (pregnancy is Hediff_MultiplePregnancy h) { @@ -1254,41 +1252,30 @@ namespace RJW_Menstruation } else { - Configurations.PregnancyType usePregnancy = xxx.is_human(Pawn) ? Configurations.PregnancySource : Configurations.PregnancyType.MultiplePregnancy; - switch (usePregnancy) + if (!Configurations.UseMultiplePregnancy) { - case Configurations.PregnancyType.BaseRJW: - - if (Configurations.Debug) Log.Message($"Creating new base RJW pregnancy"); - PregnancyHelper.PregnancyDecider(Pawn, egg.fertilizer); - // I hate having to do this, but it gets the newest pregnancy - List pregnancies = new List(); - Pawn.health.hediffSet.GetHediffs(ref pregnancies); - pregnancy = pregnancies.MaxBy(hediff => hediff.loadID); - pregnant = true; - break; - - case Configurations.PregnancyType.MultiplePregnancy: - if (Configurations.Debug) Log.Message($"Creating new menstruation pregnancy"); - pregnancy = Hediff_BasePregnancy.Create(Pawn, egg.fertilizer); - pregnant = true; - deadeggs.Add(egg); - break; - - case Configurations.PregnancyType.Biotech: - if (Configurations.Debug) Log.Message($"Creating new biotech pregnancy"); - pregnancy = HediffMaker.MakeHediff(HediffDefOf.PregnantHuman, Pawn); - ((Hediff_Pregnant)pregnancy).SetParents(Pawn, egg.fertilizer, PregnancyUtility.GetInheritedGeneSet(egg.fertilizer, Pawn)); - Pawn.health.AddHediff(pregnancy); - break; + if (Configurations.Debug) Log.Message($"Creating new base RJW pregnancy"); + PregnancyHelper.PregnancyDecider(Pawn, egg.fertilizer); + // I hate having to do this, but it gets the newest pregnancy + List pregnancies = new List(); + Pawn.health.hediffSet.GetHediffs(ref pregnancies); + pregnancy = pregnancies.MaxBy(hediff => hediff.loadID); + pregnant = true; + break; + } + else + { + if (Configurations.Debug) Log.Message($"Creating new menstruation pregnancy"); + pregnancy = Hediff_BasePregnancy.Create(Pawn, egg.fertilizer); + pregnant = true; + deadeggs.Add(egg); } if (pregnancy is Hediff_BasePregnancy rjw_preg) { - // TODO: advance biotech pregnancy rjw_preg.p_start_tick -= egg.fertstage / Configurations.CycleAcceleration * GenDate.TicksPerHour; rjw_preg.p_end_tick -= egg.fertstage / Configurations.CycleAcceleration * GenDate.TicksPerHour; } - if (!(pregnancy is Hediff_MultiplePregnancy)) break; + // TODO: advance biotech pregnancy } } @@ -1299,7 +1286,7 @@ namespace RJW_Menstruation } } - if (pregnant && (Configurations.PregnancySource != Configurations.PregnancyType.MultiplePregnancy || !Configurations.EnableHeteroOvularTwins)) + if (pregnant && (!Configurations.UseMultiplePregnancy || !Configurations.EnableHeteroOvularTwins)) { eggs.Clear(); return true; @@ -1550,7 +1537,7 @@ namespace RJW_Menstruation { if (curStageHrs >= currentIntervalHours) { - if (Pawn.health.capacities.GetLevel(xxx.reproduction) == 0 || EggHealth <= 0 || Pawn.SterileGenes()) + if (Pawn.health.capacities.GetLevel(xxx.reproduction) == 0 || EggHealth <= 0) { GoNextStage(Stage.Infertile); } @@ -1572,7 +1559,7 @@ namespace RJW_Menstruation protected virtual void InfertileAction() { - if (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0 || EggHealth <= 0 || Pawn.SterileGenes()) + if (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0 || EggHealth <= 0) { StayCurrentStageConst(Stage.Infertile); } diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs index 7d3ffa3..a243f52 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/MenstruationUtility.cs @@ -92,7 +92,10 @@ namespace RJW_Menstruation if (hediff is Hediff_MechanoidPregnancy) return ContentFinder.Get(("Womb/Mechanoid_Fluid"), true); + string icon = "Fetus/Slime_Abomi02"; + string fetustex = "Fetus/Fetus_Default"; ThingDef babydef = comp.Pawn.def; // TODO: Pregenerated babies + float gestationProgress = comp.StageProgress; int babycount = hediff is Hediff_BasePregnancy preg ? preg.babies.Count : 1; @@ -100,9 +103,8 @@ namespace RJW_Menstruation { babydef = h.babies?.FirstOrDefault()?.def ?? ThingDefOf.Human; } - - string fetustex = babydef.GetModExtension()?.fetusTexPath ?? "Fetus/Fetus_Default"; - string icon; + + fetustex = babydef.GetModExtension()?.fetusTexPath ?? "Fetus/Fetus_Default"; if (gestationProgress < 0.2f) icon = comp.WombTex + "_Implanted"; else if (gestationProgress < 0.3f) { @@ -355,12 +357,5 @@ namespace RJW_Menstruation return res; } - - public static bool HasIUD(this Pawn pawn) - { - if (pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return true; - if (ModsConfig.BiotechActive && pawn.health.hediffSet.HasHediff(HediffDefOf.ImplantedIUD)) return true; - return false; - } } } 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 e7c91dc..8abaf18 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs @@ -439,25 +439,10 @@ namespace RJW_Menstruation firstbaby = baby; request.FixedGender = baby.gender; request.ForcedEndogenes = baby.genes?.Endogenes.Select(gene => gene.def).ToList(); - if (baby.genes != null && ModsConfig.BiotechActive) - { - if (GeneUtility.SameHeritableXenotype(mother, father) && mother.genes.UniqueXenotype) - { - baby.genes.xenotypeName = mother.genes.xenotypeName; - baby.genes.iconDef = mother.genes.iconDef; - } - XenotypeDef xenoTypeDef = BabyXenoTypeDecider(mother, father, out bool hybridBaby); - if (xenoTypeDef != null) baby.genes.SetXenotypeDirect(xenoTypeDef); - if(hybridBaby) - { - baby.genes.hybrid = true; - baby.genes.xenotypeName = "Hybrid".Translate(); - } - } } else { - enzygoticSiblings.Add(baby, firstbaby); + enzygoticSiblings?.Add(baby, firstbaby); if (baby.story != null) { @@ -466,14 +451,6 @@ namespace RJW_Menstruation baby.story.bodyType = firstbaby.story.bodyType; } - if (baby.genes != null && ModsConfig.BiotechActive) - { - baby.genes.SetXenotypeDirect(firstbaby.genes.Xenotype); - baby.genes.xenotypeName = firstbaby.genes.xenotypeName; - baby.genes.iconDef = firstbaby.genes.iconDef; - baby.genes.hybrid = firstbaby.genes.hybrid; - } - if (baby.IsHAR()) HARCompatibility.CopyHARProperties(baby, firstbaby); //if (Configurations.AnimalGeneticsActivated) @@ -644,39 +621,6 @@ namespace RJW_Menstruation } - public XenotypeDef BabyXenoTypeDecider(Pawn mother, Pawn father, out bool hybrid) - { - hybrid = false; - bool hybridMother = mother?.genes?.hybrid ?? false; - bool hybridFather = father?.genes?.hybrid ?? false; - if (hybridMother && hybridFather) - { - hybrid = true; - return null; - } - XenotypeDef motherInheritableXenotype = mother?.genes?.Xenotype; - XenotypeDef fatherInheritableXenotype = father?.genes?.Xenotype; - if (!motherInheritableXenotype.inheritable) motherInheritableXenotype = null; - if (!fatherInheritableXenotype.inheritable) fatherInheritableXenotype = null; - - // If they're the same (or both null) - if (motherInheritableXenotype == fatherInheritableXenotype) - { - // Both null, but one's a hybrid - if (motherInheritableXenotype == null && (hybridMother || hybridFather)) - hybrid = true; - - return motherInheritableXenotype; - } - - // If one is null and the other isn't - if ((motherInheritableXenotype == null) != (fatherInheritableXenotype == null)) return motherInheritableXenotype ?? fatherInheritableXenotype; - - // So two different inheritable ones - hybrid = true; - return null; - } - public PawnKindDef GetHybrid(Pawn first, Pawn second) { PawnKindDef res = null; 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 deleted file mode 100644 index 2257c55..0000000 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs +++ /dev/null @@ -1,64 +0,0 @@ -using HarmonyLib; -using System.Linq; -using RimWorld; -using Verse; - -namespace RJW_Menstruation -{ - [HarmonyPatch(typeof(Hediff_Pregnant), "Miscarry")] - public class Miscarry_Patch - { - public static void Postfix(Hediff_Pregnant __instance) - { - HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy(); - if (comp == null) return; - comp.Pregnancy = null; - } - } - - [HarmonyPatch(typeof(Hediff_Pregnant), nameof(Hediff_Pregnant.StartLabor))] - public class StartLabor_Patch - { - public static void Postfix(Hediff_Pregnant __instance) - { - HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy(); - if (comp == null) return; - comp.Pregnancy = __instance.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PregnancyLabor); - } - } - - [HarmonyPatch(typeof(Hediff_Labor), nameof(Hediff_Labor.PreRemoved))] - public class Labor_PreRemoved_Patch - { - public static void PostFix(Hediff_Labor __instance) - { - HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy(); - if (comp == null) return; - comp.Pregnancy = __instance.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PregnancyLaborPushing); - } - } - - [HarmonyPatch(typeof(Hediff_LaborPushing), nameof(Hediff_LaborPushing.PreRemoved))] - public class LaborPushing_PreRemoved_Patch - { - public static void PostFix(Hediff_LaborPushing __instance) - { - HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy(); - if (comp == null) return; - comp.Pregnancy = null; - } - } - - // Prevents a pregnancy from going into labor if another pregnancy already is - [HarmonyPatch(typeof(Hediff_Pregnant), nameof(Hediff_Pregnant.GestationProgress), MethodType.Getter)] - public class Hediff_Pregnant_GestationProgess_Patch - { - public static void PostFix(Hediff_Pregnant __instance, ref float __result) - { - if (__result < 1f) return; - Pawn pawn = __instance.pawn; - if (pawn.health.hediffSet.hediffs.Any(hediff => hediff.def == HediffDefOf.PregnancyLabor || hediff.def == HediffDefOf.PregnancyLaborPushing)) - __result = 0.999f; - } - } -} \ No newline at end of file diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs index 5062aee..18931b3 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs @@ -1,5 +1,4 @@ using HarmonyLib; -using RimWorld; using rjw; using rjw.Modules.Interactions.Enums; using rjw.Modules.Interactions.Objects; @@ -43,7 +42,7 @@ namespace RJW_Menstruation } else if (Genital_Helper.has_ovipositorM(pawn, pawnparts)) { - comp.CumIn(pawn, Rand.Range(0.75f, 4.5f) * pawn.BodySize, partner.SterileGenes() ? 0.0f : 1.0f); + comp.CumIn(pawn, Rand.Range(0.75f, 4.5f) * pawn.BodySize, 1.0f); } else comp.CumIn(pawn, pawn.GetCumVolume(pawnparts), 0); @@ -115,7 +114,7 @@ namespace RJW_Menstruation comp.CumIn(pawn, pawn.GetCumVolume(), 0); return false; } - else comp.CumIn(pawn, pawn.GetCumVolume(), pawn.SterileGenes() ? 0.0f : pawn.health.capacities.GetLevel(xxx.reproduction)); + else comp.CumIn(pawn, pawn.GetCumVolume(), pawn.health.capacities.GetLevel(xxx.reproduction)); return false; } } diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj b/1.4/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj index 22ab246..35f0a1c 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj @@ -70,7 +70,6 @@ - diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Translations.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Translations.cs index 973a90b..8f0de67 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Translations.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Translations.cs @@ -122,9 +122,6 @@ namespace RJW_Menstruation public static readonly string Option_EstrusFuckability_Label = "Option_EstrusFuckability_Label".Translate(); public static readonly string Option_EstrusAttractability_Label = "Option_EstrusAttractability_Label".Translate(); public static readonly string Option_EstrusRelationship_Label = "Option_EstrusRelationship_Label".Translate(); - public static readonly string Option_PregnancyFromBaseRJW_Label = "Option_PregnancyFromBaseRJW_Label".Translate(); - public static readonly string Option_PregnancyFromMultiplePregnancy_Label = "Option_PregnancyFromMultiplePregnancy_Label".Translate(); - public static readonly string Option_PregnancyFromBiotech_Label = "Option_PregnancyFromBiotech_Label".Translate(); public static readonly string Button_ResetToDefault = "Button_ResetToDefault".Translate(); diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs index 8a8e380..e90643b 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/UI/Dialog_WombStatus.cs @@ -230,7 +230,7 @@ namespace RJW_Menstruation fontstyleright.alignment = TextAnchor.MiddleRight; buttonstyle.alignment = TextAnchor.MiddleLeft; - string father = p.Father?.LabelShort ?? Translations.Dialog_FatherUnknown; + string father = p.Father.LabelShort; GUI.Box(preginfo, "1 " + p.Mother.def.label + " " + Translations.Dialog_WombInfo02, buttonstyle); GUI.Label(preginfo, Translations.Dialog_WombInfo03 + ": " + father + " ", fontstyleright); diff --git a/About/Manifest.xml b/About/Manifest.xml index a46c110..b1bb3ff 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,7 +1,7 @@ RJW Menstruation - 1.0.8.1 + 1.0.8.0 diff --git a/LoadFolders.xml b/LoadFolders.xml index 1707748..4179abb 100644 --- a/LoadFolders.xml +++ b/LoadFolders.xml @@ -13,7 +13,7 @@
  • 1.4
  • -
  • 1.4/RJW Menstruation Race Support
  • +
  • 1.4/RJW Menstruation Race Support
  • \ No newline at end of file diff --git a/changelogs.txt b/changelogs.txt index f1d9b91..1ab4156 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -1,14 +1,3 @@ -Version 1.0.8.1 - - Added the option for humans to start Biotech pregnancies if the DLC is enabled. If set, non-humans will use the old multiple pregnancy instead. - - Babies conceived through the multiple pregnancy option will now properly inherit xenotypes. - - Properly track biotech pregnancy through labor. - - Pawns that are genetically sterile will no longer produce fertile cum, nor have a menstrual cycle. - - Biotech IUDs will now reduce pregnancy chances the same as an RJW IUD. Using both will not stack. - - A biotech pregnancy will pause before going into labor if another womb already is in labor. - - Fix disabling menopause not actually disabling menopause. - - Fix errors in womb dialog for Biotech pregnancies with null father. - - Properly detect AsmodeusRex's race support. - Version 1.0.8.0 - Support for RimWorld 1.4. All future changes to Menstruation will only be for Rimworld 1.4. - Existing Biotech pregnancies will appear in a womb, but no support yet for starting a Biotech pregnancy.