mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2026-06-18 19:25:57 +00:00
- Removed DDS Files - Added Initial Support for Rimworld 1.6 - Added Additional mod requirement to PatchBSShared.xml to prevent premature loading. - Refactored Cumpilation integration to make it optional rather then a Required Mod. - Disabled succubus tail interactions pending rewrite for RJW's new interactions system. - Disabled Quirks pending rewrite RJW separating them into their own mod.
26 lines
704 B
C#
26 lines
704 B
C#
using HarmonyLib;
|
|
using rjw;
|
|
using System.Linq;
|
|
using Verse;
|
|
|
|
namespace RJW_Genes.Genes
|
|
{
|
|
[HarmonyPatch]
|
|
public static class Patch_AddNotifyOnGeneration
|
|
{
|
|
[HarmonyPatch(typeof(PawnGenerator), "GenerateGenes")]
|
|
[HarmonyPostfix]
|
|
public static void PawnGenerator_GenerateGenes_Postfix(Pawn pawn)
|
|
{
|
|
if (pawn == null || pawn.genes == null) return;
|
|
|
|
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn)) return;
|
|
|
|
foreach (var gene in pawn.genes.GenesListForReading)
|
|
{
|
|
if (gene != null && gene is RJW_Gene rjwGene)
|
|
rjwGene.Notify_OnPawnGeneration();
|
|
}
|
|
}
|
|
}
|
|
}
|