Compare commits

..

No commits in common. "8b7902bc8a944bf7d24aa0839d265d44eaa51656" and "b615b85597985403cff0da8e1523844d9f998ff2" have entirely different histories.

7 changed files with 2 additions and 54 deletions

Binary file not shown.

View file

@ -133,6 +133,5 @@
<CustomHybrid_Title>Hybrids of {0}</CustomHybrid_Title> <CustomHybrid_Title>Hybrids of {0}</CustomHybrid_Title>
<CustomHybrid_Tooltip>When {0} breed with {1}, {2} will be born at {3} chance.&#10;If both races have hybrid definitions for each other, the father's definition will be used.</CustomHybrid_Tooltip> <CustomHybrid_Tooltip>When {0} breed with {1}, {2} will be born at {3} chance.&#10;If both races have hybrid definitions for each other, the father's definition will be used.</CustomHybrid_Tooltip>
<CannotNoEggs>No eggs</CannotNoEggs>
</LanguageData> </LanguageData>

View file

@ -1030,7 +1030,7 @@ namespace RJW_Menstruation
if (cycleVariability < 0f) cycleVariability = MenstruationUtility.RandomVariabilityPercent(); if (cycleVariability < 0f) cycleVariability = MenstruationUtility.RandomVariabilityPercent();
if (currentIntervalHours < 0) if (currentIntervalHours < 0)
{ {
if (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0 || Pawn.SterileGenes()) curStage = Stage.Infertile; if (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) curStage = Stage.Infertile;
else if (!IsBreedingSeason()) curStage = Stage.Anestrus; else if (!IsBreedingSeason()) curStage = Stage.Anestrus;
else curStage = RandomStage(); else curStage = RandomStage();
if (curStage == Stage.Follicular) if (curStage == Stage.Follicular)

View file

@ -2,7 +2,6 @@
using System.Linq; using System.Linq;
using RimWorld; using RimWorld;
using Verse; using Verse;
using System.Collections.Generic;
namespace RJW_Menstruation namespace RJW_Menstruation
{ {
@ -62,50 +61,4 @@ namespace RJW_Menstruation
__result = 0.999f; __result = 0.999f;
} }
} }
[HarmonyPatch(typeof(Recipe_ExtractOvum), nameof(Recipe_ExtractOvum.AvailableReport))]
public class ExtractOvum_AvailableReport_Patch
{
public static void PostFix(Thing thing, ref AcceptanceReport __result)
{
if (!__result.Accepted) return;
Pawn pawn = (Pawn)thing;
if (pawn.IsRJWPregnant())
{
__result = "CannotPregnant".Translate();
return;
}
List<HediffComp_Menstruation> comps = pawn.GetMenstruationComps().ToList();
if (!comps.Any()) return;
if (comps.All(comp => comp.ovarypower <= 0))
{
__result = Translations.CannotNoEggs;
return;
}
return;
}
}
[HarmonyPatch(typeof(Recipe_ExtractOvum), "OnSurgerySuccess")]
public class ExtractOvum_OnSurgerySuccess_Patch
{
public static void PostFix(Pawn pawn)
{
List<HediffComp_Menstruation> comps = pawn.GetMenstruationComps().ToList();
if (!comps.Any()) return;
HediffComp_Menstruation mostEggs = comps.MaxBy(comp => comp.ovarypower);
if (mostEggs.ovarypower <= 0) return; // Shouldn't happen
mostEggs.ovarypower--;
}
}
[HarmonyPatch(typeof(Recipe_ImplantEmbryo), nameof(Recipe_ImplantEmbryo.ApplyOnPawn))]
public class ImplantEmbryo_ApplyOnPawn_Patch
{
public static void PostFix(Pawn pawn)
{
foreach (HediffComp_Menstruation comp in pawn.GetMenstruationComps())
comp.TakeLoosePregnancy();
}
}
} }

View file

@ -135,8 +135,6 @@ namespace RJW_Menstruation
public static readonly string Gizmo_GatherCum = "Gizmo_GatherCum".Translate(); public static readonly string Gizmo_GatherCum = "Gizmo_GatherCum".Translate();
public static readonly string FloatMenu_CleanSelf = "FloatMenu_CleanSelf".Translate(); public static readonly string FloatMenu_CleanSelf = "FloatMenu_CleanSelf".Translate();
public static readonly string CannotNoEggs = "CannotNoEggs".Translate();
public static readonly string CustomHybrid_List_Title = "CustomHybrid_List_Title".Translate(); public static readonly string CustomHybrid_List_Title = "CustomHybrid_List_Title".Translate();
static public string CustomHybrid_Title(string label) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Title", label); } static public string CustomHybrid_Title(string label) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Title", label); }
static public string CustomHybrid_Tooltip(string label, string breedee, string baby, string chance) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Tooltip", label, breedee, baby, chance); } static public string CustomHybrid_Tooltip(string label, string breedee, string baby, string chance) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Tooltip", label, breedee, baby, chance); }

View file

@ -1,7 +1,5 @@
Version 1.0.8.2 Version 1.0.8.2
- Updated race support patches for new and removed vaginas. - Updated race support patches for new and removed vaginas.
- The Biotech extract ovum operation will now remove an egg from a pawn's ovaries.
- A pawn's womb should now recognize an implanted embryo.
Version 1.0.8.1 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. - 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.