Compare commits

...

10 commits

Author SHA1 Message Date
Akiyami Solo
546d412d3c Merge branch 'dev' into 'dev'
Breast fullness is not displayed and the "milk yourself" action is not invoked on a pawn when the rjw-mc-biotech mod is present

See merge request lutepickle/rjw_menstruation!6
2024-07-27 16:14:58 +00:00
lutepickle
ad7919a25b Also add the father/mother check to the childbirth ritual 2024-07-26 22:26:52 -07:00
lutepickle
d4f8312cee HediffWithParents.PreRemoved doesn't like it if mother equals father, so add some checks for that 2024-07-26 22:02:23 -07:00
Акиями Соло
cdfe9b44b8 reduction of unnecessary inspections 2024-01-11 20:55:26 +03:00
Акиями Соло
b21fc85a29 fix JobDef link for mod rjw-mc-biotech mod 2024-01-11 20:39:07 +03:00
Акиями Соло
48f020d832 fix display of breast fullness in gui for rjw-mc-biotech mod 2024-01-11 20:38:38 +03:00
lutepickle
23ae342722 Merge branch 'dev' 2024-01-08 13:55:51 -08:00
lutepickle
509eeabddc Merge branch 'dev' 2023-07-28 17:29:32 -07:00
lutepickle
6fabfd6aaf Revert "Initialize womb when displaying gizmo if needed."
This reverts commit ebbbf8ee7f.
2023-07-03 09:08:52 -07:00
lutepickle
ebbbf8ee7f Initialize womb when displaying gizmo if needed. 2023-07-03 08:54:19 -07:00
6 changed files with 11 additions and 4 deletions

View file

@ -276,7 +276,10 @@ namespace RJW_Menstruation
float res = 0; float res = 0;
if (VariousDefOf.Hediff_Heavy_Lactating_Permanent != null) if (VariousDefOf.Hediff_Heavy_Lactating_Permanent != null)
{ {
if (pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Heavy_Lactating_Permanent)) milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("hypermilkable")); if (pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Heavy_Lactating_Permanent)
|| pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Lactating_Permanent)
|| pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Lactating_Natural)
|| pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Lactating_Drug)) milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("milkablehuman"));
else milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("milkable")); else milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("milkable"));
} }
else else

View file

@ -158,7 +158,7 @@ namespace RJW_Menstruation
public static readonly HediffDef Hediff_Lactating_Natural = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Natural"); public static readonly HediffDef Hediff_Lactating_Natural = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Natural");
public static readonly HediffDef Hediff_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Permanent"); public static readonly HediffDef Hediff_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Permanent");
public static readonly HediffDef Hediff_Heavy_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Heavy_Lactating_Permanent"); public static readonly HediffDef Hediff_Heavy_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Heavy_Lactating_Permanent");
public static readonly JobDef Job_LactateSelf_MC = DefDatabase<JobDef>.GetNamedSilentFail("LactateSelf_MC"); public static readonly JobDef Job_LactateSelf_MC = DefDatabase<JobDef>.GetNamedSilentFail("MilkSelf");
// Defs from Sexperience Ideology // Defs from Sexperience Ideology
public static readonly PreceptDef Pregnancy_Elevated = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Elevated"); public static readonly PreceptDef Pregnancy_Elevated = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Elevated");

Binary file not shown.

View file

@ -1429,7 +1429,9 @@ namespace RJW_Menstruation
pregnancy = HediffMaker.MakeHediff(HediffDefOf.PregnantHuman, Pawn); pregnancy = HediffMaker.MakeHediff(HediffDefOf.PregnantHuman, Pawn);
if (Configurations.EnableBiotechTwins) if (Configurations.EnableBiotechTwins)
pregnancy.TryGetComp<HediffComp_PregeneratedBabies>().AddNewBaby(Pawn, egg.fertilizer); pregnancy.TryGetComp<HediffComp_PregeneratedBabies>().AddNewBaby(Pawn, egg.fertilizer);
((Hediff_Pregnant)pregnancy).SetParents(Pawn, egg.fertilizer, PregnancyUtility.GetInheritedGeneSet(egg.fertilizer, Pawn)); Pawn father = egg.fertilizer;
if (Pawn == father) father = null;
((Hediff_Pregnant)pregnancy).SetParents(Pawn, father, PregnancyUtility.GetInheritedGeneSet(father, Pawn));
Pawn.health.AddHediff(pregnancy); Pawn.health.AddHediff(pregnancy);
pregnant = true; pregnant = true;
deadeggs.Add(egg); deadeggs.Add(egg);

View file

@ -234,6 +234,7 @@ namespace RJW_Menstruation
{ {
Pawn baby = comp.PeekBaby(); Pawn baby = comp.PeekBaby();
Pawn thisFather = baby.GetFather() ?? father; Pawn thisFather = baby.GetFather() ?? father;
if (thisFather == geneticMother || thisFather == mother) thisFather = null;
baby.relations.ClearAllRelations(); // To keep ApplyBirthOutcome from erroring when it tries to set up relations baby.relations.ClearAllRelations(); // To keep ApplyBirthOutcome from erroring when it tries to set up relations
PregnancyUtility.ApplyBirthOutcome_NewTemp(thisOutcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments, preventLetter); PregnancyUtility.ApplyBirthOutcome_NewTemp(thisOutcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments, preventLetter);
@ -293,6 +294,7 @@ namespace RJW_Menstruation
{ {
Pawn baby = comp.PeekBaby(); Pawn baby = comp.PeekBaby();
Pawn thisFather = baby.GetFather() ?? father; Pawn thisFather = baby.GetFather() ?? father;
if (thisFather == geneticMother || thisFather == mother) thisFather = null;
baby.relations.ClearAllRelations(); baby.relations.ClearAllRelations();
PregnancyUtility.ApplyBirthOutcome(outcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments); PregnancyUtility.ApplyBirthOutcome(outcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments);

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest> <Manifest>
<identifier>RJW Menstruation</identifier> <identifier>RJW Menstruation</identifier>
<version>1.5.0.1</version> <version>1.5.0.2</version>
<dependencies> <dependencies>
</dependencies> </dependencies>
<incompatibleWith /> <incompatibleWith />