rjw_menstruation/1.3/source/RJW_Menstruation/MilkModule/Milk_Patch.cs
2022-08-31 09:13:04 -07:00

28 lines
780 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), nameof(HumanCompHasGatherableBodyResource.Gathered))]
public static class Milk_Patch
{
public static void Postfix(HumanCompHasGatherableBodyResource __instance)
{
if (__instance.parent is Pawn pawn)
pawn.GetBreastComp()?.AdjustNippleProgress(Rand.Range(0.0f, 0.005f) * Configurations.MaxNippleIncrementFactor);
}
}
}