2022-03-02 13:15:22 +00:00
|
|
|
|
using HarmonyLib;
|
2021-09-24 15:14:02 +00:00
|
|
|
|
using rjw;
|
2022-03-02 13:15:22 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Verse;
|
2021-09-24 15:14:02 +00:00
|
|
|
|
|
|
|
|
|
namespace RJWSexperience
|
|
|
|
|
{
|
2022-03-02 13:15:22 +00:00
|
|
|
|
[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-24 15:50:50 +00:00
|
|
|
|
if (__result == null)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
bool doVirginTrait = true;
|
|
|
|
|
|
|
|
|
|
if (SexperienceMod.Settings.History.EnableRecordRandomizer && !request.Newborn && xxx.is_human(__result))
|
|
|
|
|
doVirginTrait = RecordRandomizer.Randomize(__result);
|
|
|
|
|
|
|
|
|
|
if (doVirginTrait)
|
2022-06-12 06:50:36 +00:00
|
|
|
|
Virginity.TraitHandler.AddVirginTrait(__result);
|
2022-03-02 13:15:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-09-24 15:14:02 +00:00
|
|
|
|
}
|