mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
33 lines
810 B
C#
33 lines
810 B
C#
using HarmonyLib;
|
|
using Milk;
|
|
using RJW_Menstruation;
|
|
using System.Reflection;
|
|
using Verse;
|
|
|
|
namespace MilkModule
|
|
{
|
|
internal static class First
|
|
{
|
|
static First()
|
|
{
|
|
Harmony har = new Harmony("RJW_Menstruation_MilkModule");
|
|
har.PatchAll(Assembly.GetExecutingAssembly());
|
|
}
|
|
}
|
|
|
|
[HarmonyPatch(typeof(HumanCompHasGatherableBodyResource), "Gathered")]
|
|
public static class Milk_Patch
|
|
{
|
|
public static void Postfix(HumanCompHasGatherableBodyResource __instance)
|
|
{
|
|
HediffComp_Breast comp = null;
|
|
if (__instance.parent is Pawn pawn) comp = pawn.GetBreastComp();
|
|
if (comp != null)
|
|
{
|
|
comp.AdjustNippleProgress(Rand.Range(0.0f, 0.01f));
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|