Rename zygotes to monozygoticSiblings

This commit is contained in:
lutepickle 2022-07-27 14:35:36 -07:00
parent 5b6093fd86
commit dbebba0d45

View file

@ -10,7 +10,7 @@ namespace RJW_Menstruation
public class Hediff_MultiplePregnancy : Hediff_BasePregnancy public class Hediff_MultiplePregnancy : Hediff_BasePregnancy
{ {
//public List<Pawn> zygotes; //public List<Pawn> zygotes;
public Dictionary<Pawn, Pawn> zygotes; // Each pawn and who they split from public Dictionary<Pawn, Pawn> monozygoticSiblings; // Each pawn and who they split from
public override void DiscoverPregnancy() public override void DiscoverPregnancy()
{ {
@ -245,7 +245,7 @@ namespace RJW_Menstruation
public override void PostBirth(Pawn mother, Pawn father, Pawn baby) public override void PostBirth(Pawn mother, Pawn father, Pawn baby)
{ {
base.PostBirth(mother, father, baby); base.PostBirth(mother, father, baby);
if (zygotes.NullOrEmpty() || !zygotes.TryGetValue(baby, out Pawn original) || baby == original) return; if (monozygoticSiblings.NullOrEmpty() || !monozygoticSiblings.TryGetValue(baby, out Pawn original) || baby == original) return;
// Has to happen on birth since RJW redoes the genitals at birth // Has to happen on birth since RJW redoes the genitals at birth
ProcessIdenticalSibling(baby, original); ProcessIdenticalSibling(baby, original);
} }
@ -347,7 +347,7 @@ namespace RJW_Menstruation
public override void ExposeData() public override void ExposeData()
{ {
base.ExposeData(); base.ExposeData();
Scribe_Collections.Look(ref zygotes, "zygotes", keyLookMode: LookMode.Reference, valueLookMode: LookMode.Reference); Scribe_Collections.Look(ref monozygoticSiblings, "monozygoticSiblings", keyLookMode: LookMode.Reference, valueLookMode: LookMode.Reference);
} }
protected override void GenerateBabies() protected override void GenerateBabies()
@ -461,7 +461,7 @@ namespace RJW_Menstruation
} }
} }
if (firstbaby != null) zygotes?.Add(baby, firstbaby); if (firstbaby != null) monozygoticSiblings?.Add(baby, firstbaby);
} }
} }
@ -730,7 +730,7 @@ namespace RJW_Menstruation
public override void Initialize(Pawn mother, Pawn dad) public override void Initialize(Pawn mother, Pawn dad)
{ {
base.Initialize(mother, dad); base.Initialize(mother, dad);
zygotes = new Dictionary<Pawn, Pawn>(); monozygoticSiblings = new Dictionary<Pawn, Pawn>();
} }
} }