Add patch to darken nipples during Biotech lactation, but commented out

This commit is contained in:
lutepickle 2023-03-01 17:00:58 -08:00
parent 09f9438bcc
commit 69934d06f5

View file

@ -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<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> 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;
// }
// }
//}
}