Пример #1
0
 public static void RJW_GenerateBabies_Prefix(Pawn ___pawn, Pawn ___father)
 {
     ParentReferences.Push(new ParentReferences.Record
     {
         Mother = ___pawn?.AnimalGenetics(),
         Father = ___father?.AnimalGenetics(),
     });
 }
Пример #2
0
            public static void Prefix(ThingWithComps ___parent)
            {
                var comp = ___parent.TryGetComp <EggGeneticInformation>();

                ParentReferences.Push(new ParentReferences.Record {
                    This = comp.GeneticInformation
                });
            }
Пример #3
0
            public static void Prefix(Pawn mother, Pawn father)
            {
                var motherGeneticInformation = mother?.AnimalGenetics();
                var fatherGeneticInformation = father?.AnimalGenetics();

                if (fatherGeneticInformation == null && motherGeneticInformation != null)
                {
                    var fatherGeneticInformationComp = mother.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.Pregnant)
                                                       .TryGetComp <FatherGeneticInformation>();
                    fatherGeneticInformation = fatherGeneticInformationComp?.GeneticInformation;
                }

                ParentReferences.Push(new ParentReferences.Record {
                    Mother = motherGeneticInformation, Father = fatherGeneticInformation
                });
            }
Пример #4
0
 public static void RJW_GenerateBabies_Prefix(Pawn ___pawn, Pawn ___father)
 {
     ParentReferences.Push(new ParentReferences.Record {
         mother = ___pawn, father = ___father
     });
 }
Пример #5
0
 static public void Prefix(Pawn mother, Pawn father)
 {
     ParentReferences.Push(new ParentReferences.Record {
         mother = mother, father = father
     });
 }