2022-11-20 19:53:05 +00:00
using HarmonyLib ;
using rjw ;
using Verse ;
namespace RJW_Genes
{
/// <summary>
/// Kindly provided by 'shabalox' https://github.com/Shabalox/RJW_Genes_Addons/
2022-11-21 14:15:33 +00:00
///
/// Note on the logic: the result mentioned below is changing the result of fertilization (true or false) to true if the pawn has the insect-breeder gene.
2022-11-20 19:53:05 +00:00
/// </summary>
[HarmonyPatch(typeof(PawnExtensions), "RaceImplantEggs")]
public static class PatchPawnExtensions
{
[HarmonyPostfix]
public static void Postfix ( Pawn pawn , ref bool __result )
{
if ( ! __result )
{
2022-11-26 20:32:32 +00:00
__result = GeneUtility . IsInsectBreeder ( pawn ) ;
2022-11-20 19:53:05 +00:00
}
}
}
}