mirror of
https://github.com/Shabakur/RJW_Animal_Gene_Inheritance.git
synced 2024-08-14 22:46:41 +00:00
35 lines
890 B
C#
35 lines
890 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using HarmonyLib;
|
|||
|
using RimWorld;
|
|||
|
using Verse;
|
|||
|
using rjw;
|
|||
|
namespace RJW_BGS
|
|||
|
{
|
|||
|
[HarmonyPatch(typeof(PregnancyUtility), "GetInheritedGeneSet", new Type[]
|
|||
|
{
|
|||
|
typeof(Pawn),
|
|||
|
typeof(Pawn),
|
|||
|
//typeof(bool)
|
|||
|
}
|
|||
|
)]
|
|||
|
public static class PatchVanillaPregnancyUtility
|
|||
|
{
|
|||
|
[HarmonyPostfix]
|
|||
|
public static void AnimalInheritedGenes(Pawn father, Pawn mother, ref GeneSet __result)
|
|||
|
{
|
|||
|
List<GeneDef> genes = InheritanceUtility.AnimalInheritedGenes(father, mother);
|
|||
|
if (genes.Any())
|
|||
|
{
|
|||
|
foreach (GeneDef gene in genes)
|
|||
|
{
|
|||
|
__result.AddGene(gene);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|