mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
No commits in common. "2a7feede8bf5f2563900582f1af57de162452bbf" and "ea1c5794f950cf2fce123b7dbe98fab505c5c37c" have entirely different histories.
2a7feede8b
...
ea1c5794f9
8 changed files with 22 additions and 32 deletions
Binary file not shown.
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -472,7 +472,7 @@ namespace RJW_Menstruation
|
|||
{
|
||||
get
|
||||
{
|
||||
if (Pawn.HasIUD()) return false;
|
||||
if (Pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false;
|
||||
|
||||
switch (curStage)
|
||||
{
|
||||
|
@ -639,7 +639,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 +739,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 +852,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);
|
||||
|
|
|
@ -92,7 +92,10 @@ namespace RJW_Menstruation
|
|||
if (hediff is Hediff_MechanoidPregnancy)
|
||||
return ContentFinder<Texture2D>.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<PawnDNAModExtension>()?.fetusTexPath ?? "Fetus/Fetus_Default";
|
||||
string icon;
|
||||
|
||||
fetustex = babydef.GetModExtension<PawnDNAModExtension>()?.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -439,15 +439,14 @@ 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)
|
||||
{
|
||||
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);
|
||||
baby.genes.xenotypeName = mother.genes.xenotypeName;
|
||||
baby.genes.iconDef = mother.genes.iconDef;
|
||||
}
|
||||
if (baby.genes != null)
|
||||
{
|
||||
baby.genes.SetXenotypeDirect(BabyXenoTypeDecider(mother, father, out bool hybridBaby));
|
||||
if(hybridBaby)
|
||||
{
|
||||
baby.genes.hybrid = true;
|
||||
|
@ -457,7 +456,7 @@ namespace RJW_Menstruation
|
|||
}
|
||||
else
|
||||
{
|
||||
enzygoticSiblings.Add(baby, firstbaby);
|
||||
enzygoticSiblings?.Add(baby, firstbaby);
|
||||
|
||||
if (baby.story != null)
|
||||
{
|
||||
|
@ -466,7 +465,7 @@ namespace RJW_Menstruation
|
|||
baby.story.bodyType = firstbaby.story.bodyType;
|
||||
}
|
||||
|
||||
if (baby.genes != null && ModsConfig.BiotechActive)
|
||||
if (baby.genes != null)
|
||||
{
|
||||
baby.genes.SetXenotypeDirect(firstbaby.genes.Xenotype);
|
||||
baby.genes.xenotypeName = firstbaby.genes.xenotypeName;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -2,10 +2,7 @@ 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 errors in womb dialog for Biotech pregnancies with null father.
|
||||
|
||||
Version 1.0.8.0
|
||||
- Support for RimWorld 1.4. All future changes to Menstruation will only be for Rimworld 1.4.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue