mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
4 commits
b615b85597
...
8b7902bc8a
Author | SHA1 | Date | |
---|---|---|---|
|
8b7902bc8a | ||
|
a8793765c5 | ||
|
0154f89438 | ||
|
4f2830084c |
7 changed files with 54 additions and 2 deletions
Binary file not shown.
|
@ -132,6 +132,7 @@
|
||||||
<CustomHybrid_List_Title>Custom Hybrid Editor</CustomHybrid_List_Title>
|
<CustomHybrid_List_Title>Custom Hybrid Editor</CustomHybrid_List_Title>
|
||||||
<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. 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. If both races have hybrid definitions for each other, the father's definition will be used.</CustomHybrid_Tooltip>
|
||||||
|
|
||||||
|
|
||||||
|
<CannotNoEggs>No eggs</CannotNoEggs>
|
||||||
|
|
||||||
</LanguageData>
|
</LanguageData>
|
Binary file not shown.
|
@ -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) curStage = Stage.Infertile;
|
if (Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0 || Pawn.SterileGenes()) 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)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace RJW_Menstruation
|
namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
|
@ -61,4 +62,50 @@ 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -135,6 +135,8 @@ 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); }
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue