mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
4 commits
fe20e9d78b
...
82440db26b
Author | SHA1 | Date | |
---|---|---|---|
|
82440db26b | ||
|
9891f72fc6 | ||
|
08d84801a6 | ||
|
86aef06981 |
6 changed files with 35 additions and 31 deletions
Binary file not shown.
Binary file not shown.
|
@ -20,22 +20,15 @@ namespace RJW_Menstruation
|
|||
AlienPartGenerator.AlienComp originalHARComp = original?.TryGetComp<AlienPartGenerator.AlienComp>();
|
||||
if (babyHARComp == null || originalHARComp == null) return;
|
||||
|
||||
babyHARComp.addonVariants = new List<int>(originalHARComp.addonVariants);
|
||||
foreach (KeyValuePair<string, AlienPartGenerator.ExposableValueTuple<Color, Color>> channel in originalHARComp.ColorChannels)
|
||||
{
|
||||
babyHARComp.OverwriteColorChannel(channel.Key, channel.Value.first, channel.Value.second);
|
||||
}
|
||||
babyHARComp.headVariant = originalHARComp.headVariant;
|
||||
babyHARComp.bodyVariant = originalHARComp.bodyVariant;
|
||||
babyHARComp.headMaskVariant = originalHARComp.headMaskVariant;
|
||||
babyHARComp.bodyMaskVariant = originalHARComp.bodyMaskVariant;
|
||||
}
|
||||
|
||||
// HAR doesn't populate variants until the graphics are called for, so this has to happen late
|
||||
public static void CopyHARPropertiesPostBirth(Pawn baby, Pawn original)
|
||||
{
|
||||
AlienPartGenerator.AlienComp babyHARComp = baby?.TryGetComp<AlienPartGenerator.AlienComp>();
|
||||
AlienPartGenerator.AlienComp originalHARComp = original?.TryGetComp<AlienPartGenerator.AlienComp>();
|
||||
if (babyHARComp == null || originalHARComp == null) return;
|
||||
if (originalHARComp.addonVariants != null) // Testing has shown that the addons are valid by this point, but it's better to be safe
|
||||
babyHARComp.addonVariants = new List<int>(originalHARComp.addonVariants);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -244,8 +244,6 @@ namespace RJW_Menstruation
|
|||
CopyBodyPartRecord(baby, original, Genital_Helper.get_breastsBPR(baby), Genital_Helper.get_breastsBPR(original));
|
||||
CopyBodyPartRecord(baby, original, Genital_Helper.get_uddersBPR(baby), Genital_Helper.get_uddersBPR(original));
|
||||
CopyBodyPartRecord(baby, original, Genital_Helper.get_anusBPR(baby), Genital_Helper.get_anusBPR(original));
|
||||
if (baby.IsHAR())
|
||||
HARCompatibility.CopyHARPropertiesPostBirth(baby, original);
|
||||
}
|
||||
|
||||
public override void PostBirth(Pawn mother, Pawn father, Pawn baby)
|
||||
|
@ -411,13 +409,6 @@ namespace RJW_Menstruation
|
|||
{
|
||||
Pawn baby = GenerateBaby(request, mother, father, parentTraits, traitSeed);
|
||||
if (baby == null) break;
|
||||
if (division > 1)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
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)
|
||||
|
@ -433,6 +424,15 @@ namespace RJW_Menstruation
|
|||
baby.genes.xenotypeName = "Hybrid".Translate();
|
||||
}
|
||||
}
|
||||
if (division > 1)
|
||||
{
|
||||
if (baby.IsHAR()) // necessary for HAR to decide on graphical properties pre-birth
|
||||
baby.Drawer.renderer.graphics.ResolveAllGraphics();
|
||||
if (i == 0)
|
||||
{
|
||||
firstbaby = baby;
|
||||
request.FixedGender = baby.gender;
|
||||
request.ForcedEndogenes = baby.genes?.Endogenes.Select(gene => gene.def).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -110,6 +110,16 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(PregnancyUtility), nameof(PregnancyUtility.ApplyBirthOutcome))]
|
||||
public class ApplyBirthOutcome_Patch
|
||||
{
|
||||
public static void PostFix(Thing birtherThing)
|
||||
{
|
||||
if (birtherThing is Pawn pawn && !pawn.health.Dead)
|
||||
pawn.GetBreastComp()?.GaveBirth();
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(PregnancyUtility), nameof(PregnancyUtility.TryTerminatePregnancy))]
|
||||
public class TryTerminatePregnancy_Patch
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Version 1.0.8.4
|
||||
- Fix Biotech xenotype inheritance for single-child pregnancies.
|
||||
- Newborns should now be baseliners if there are no xenotypes to inherit.
|
||||
- The Biotech terminate pregnancy recipe can now terminate a menstruation pregnancy, too.
|
||||
|
||||
|
@ -17,7 +18,7 @@ Version 1.0.8.2
|
|||
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.
|
||||
- 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue