RJW-Sexperience/RJWSexperience/RJWSexperience/Patches/Rimworld_Patch.cs

21 lines
543 B
C#
Raw Normal View History

using HarmonyLib;
2021-09-24 15:14:02 +00:00
using rjw;
using System;
using Verse;
2021-09-24 15:14:02 +00:00
namespace RJWSexperience
{
[HarmonyPatch(typeof(PawnGenerator), "GeneratePawn", new Type[] { typeof(PawnGenerationRequest) })]
public static class Rimworld_Patch_GeneratePawn
{
public static void Postfix(PawnGenerationRequest request, ref Pawn __result)
{
2022-05-09 03:16:51 +00:00
if (SexperienceMod.Settings.History.EnableRecordRandomizer && __result != null && !request.Newborn && xxx.is_human(__result))
{
RecordRandomizer.Randomize(__result);
}
__result.AddVirginTrait();
}
}
2021-09-24 15:14:02 +00:00
}