diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs index e7c5192..2ffe8b3 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs @@ -220,4 +220,28 @@ namespace RJW_Menstruation comp.Notify_UpdatedGenes(); } } + + //[HarmonyPatch(typeof(ChildcareUtility), nameof(ChildcareUtility.SuckleFromLactatingPawn))] + //public class GreedyConsume_Patch + //{ + // private static float ConsumeAndAdjustNipples(HediffComp_Chargeable instance, float desiredCharge) + // { + // // Pulling breast comp every tick might be too much for performance. + // const float averageNippleChangePerTick = 0.0025f / 50000f; + // instance.Pawn.GetBreastComp()?.AdjustNippleProgress(Rand.Range(0.0f, averageNippleChangePerTick * 2) * Configurations.MaxBreastIncrementFactor); + // return instance.GreedyConsume(desiredCharge); + // } + + // private static readonly MethodInfo GreedyConsume = AccessTools.Method(typeof(HediffComp_Chargeable), nameof(HediffComp_Chargeable.GreedyConsume), new Type[] { typeof(HediffComp_Chargeable), typeof(float) }); + // public static IEnumerable Transpiler(IEnumerable instructions) + // { + // if(GreedyConsume == null) throw new InvalidOperationException("GreedyConsume not found"); + // foreach (var instruction in instructions) + // { + // if (instruction.Calls(GreedyConsume)) + // yield return CodeInstruction.Call(typeof(GreedyConsume_Patch), nameof(GreedyConsume_Patch.ConsumeAndAdjustNipples)); + // yield return instruction; + // } + // } + //} } \ No newline at end of file