rjw-quirks/RJW-Quirks/HarmonyPatches/Patch_Hediff_BasePregnancy.cs

36 lines
928 B
C#

using HarmonyLib;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using Verse;
namespace rjwquirks.HarmonyPatches
{
/*[HarmonyPatch(typeof(Hediff_BasePregnancy))]
public class Patch_Hediff_BasePregnancy
{
[HarmonyTranspiler]
[HarmonyPatch("GenerateBabies")]
public static IEnumerable<CodeInstruction> AdjustMaxLitterSize(IEnumerable<CodeInstruction> instructions)
{
bool found = false;
foreach (CodeInstruction i in instructions)
{
if (i.opcode == OpCodes.Ldc_R4 && i.operand as string == "0.33333334")
found = true;
if (found && i.opcode == OpCodes.Stloc_S)
Log.Warning(i.operand as string);
yield return i;
}
}
}*/
}