Compare commits

..

No commits in common. "5c275754461a60a1947301d648277fc5c6a69deb" and "672e6f6ecc5d4cd1de1bee965616a6dfb9b26938" have entirely different histories.

4 changed files with 8 additions and 17 deletions

Binary file not shown.

View file

@ -202,7 +202,7 @@ namespace RJW_Menstruation
Scribe_Values.Look(ref EstrusAttractivenessToHookup, "EstrusAttractivenessToHookup", EstrusAttractivenessToHookup, true); Scribe_Values.Look(ref EstrusAttractivenessToHookup, "EstrusAttractivenessToHookup", EstrusAttractivenessToHookup, true);
Scribe_Values.Look(ref EstrusRelationshipToHookup, "EstrusRelationshipToHookup", EstrusRelationshipToHookup, true); Scribe_Values.Look(ref EstrusRelationshipToHookup, "EstrusRelationshipToHookup", EstrusRelationshipToHookup, true);
Scribe_Values.Look(ref PregnancySource, "PregnancySource", PregnancySource, true); Scribe_Values.Look(ref PregnancySource, "PregnancySource", PregnancySource, true);
Scribe_Values.Look(ref EnableBiotechTwins, "EnableBiotechTwins", EnableBiotechTwins, true); Scribe_Values.Look(ref EnableBiotechTwins, "EnableBiotechTwins", EnableBiotechTwins, false); // Don't force save this, for now
Scribe_Values.Look(ref EnableHeteroOvularTwins, "EnableHeteroOvularTwins", EnableHeteroOvularTwins, true); Scribe_Values.Look(ref EnableHeteroOvularTwins, "EnableHeteroOvularTwins", EnableHeteroOvularTwins, true);
Scribe_Values.Look(ref EnableEnzygoticTwins, "EnableEnzygoticTwins", EnableEnzygoticTwins, true); Scribe_Values.Look(ref EnableEnzygoticTwins, "EnableEnzygoticTwins", EnableEnzygoticTwins, true);
Scribe_Values.Look(ref EnzygoticTwinsChance, "EnzygoticTwinsChance", EnzygoticTwinsChance, true); Scribe_Values.Look(ref EnzygoticTwinsChance, "EnzygoticTwinsChance", EnzygoticTwinsChance, true);

View file

@ -115,25 +115,16 @@ namespace RJW_Menstruation
if (hediff is Hediff_MechanoidPregnancy) if (hediff is Hediff_MechanoidPregnancy)
return ContentFinder<Texture2D>.Get(("Womb/Mechanoid_Fluid"), true); return ContentFinder<Texture2D>.Get(("Womb/Mechanoid_Fluid"), true);
float gestationProgress = comp.StageProgress; ThingDef babydef = comp.Pawn.def;
ThingDef babydef;
int babycount;
HediffComp_PregeneratedBabies babiescomp = hediff?.TryGetComp<HediffComp_PregeneratedBabies>(); HediffComp_PregeneratedBabies babiescomp = hediff?.TryGetComp<HediffComp_PregeneratedBabies>();
if (hediff is Hediff_BasePregnancy preg) if (babiescomp?.HasBaby ?? false)
{
babydef = preg.babies?.FirstOrDefault()?.def ?? ThingDefOf.Human;
babycount = preg.babies?.Count ?? 1;
}
else if (babiescomp?.HasBaby ?? false)
{
babydef = babiescomp.babies.First().def; babydef = babiescomp.babies.First().def;
babycount = babiescomp.babies.Count; float gestationProgress = comp.StageProgress;
} int babycount = hediff is Hediff_BasePregnancy preg ? preg.babies.Count : 1;
else
if (hediff is Hediff_BasePregnancy h)
{ {
babydef = comp.Pawn.def; babydef = h.babies?.FirstOrDefault()?.def ?? ThingDefOf.Human;
babycount = 1;
} }
string fetustex = babydef.GetModExtension<PawnDNAModExtension>()?.fetusTexPath ?? "Fetus/Fetus_Default"; string fetustex = babydef.GetModExtension<PawnDNAModExtension>()?.fetusTexPath ?? "Fetus/Fetus_Default";