Slight refactor of Roll_To_Skip_Patch.Transpiler and FindBestPartner_Patch.Transpiler.

This commit is contained in:
lutepickle 2022-04-28 11:45:02 -07:00
parent 2e6565fcc6
commit 4c2233659a
2 changed files with 4 additions and 5 deletions

Binary file not shown.

View file

@ -204,10 +204,9 @@ namespace RJW_Menstruation
found_fuckability = true; found_fuckability = true;
yield return new CodeInstruction(OpCodes.Ldarg_0); yield return new CodeInstruction(OpCodes.Ldarg_0);
yield return new CodeInstruction(OpCodes.Ldarg_1); yield return new CodeInstruction(OpCodes.Ldarg_1);
yield return new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(Roll_To_Skip_Patch), nameof(FuckabilityThreshold))); yield return CodeInstruction.Call(typeof(Roll_To_Skip_Patch), nameof(FuckabilityThreshold));
} }
else else yield return instruction;
yield return instruction;
} }
} }
} }
@ -240,14 +239,14 @@ namespace RJW_Menstruation
found_first_attractiveness = true; found_first_attractiveness = true;
yield return new CodeInstruction(OpCodes.Ldarg_0); yield return new CodeInstruction(OpCodes.Ldarg_0);
yield return new CodeInstruction(OpCodes.Ldarg_1); yield return new CodeInstruction(OpCodes.Ldarg_1);
yield return new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(FindBestPartner_Patch), nameof(AttractivenessThreshold))); yield return CodeInstruction.Call(typeof(FindBestPartner_Patch), nameof(AttractivenessThreshold));
} }
else if (!found_first_relationship && instruction.LoadsField(MinimumRelationshipToHookup)) else if (!found_first_relationship && instruction.LoadsField(MinimumRelationshipToHookup))
{ {
found_first_relationship = true; found_first_relationship = true;
yield return new CodeInstruction(OpCodes.Ldarg_0); yield return new CodeInstruction(OpCodes.Ldarg_0);
yield return new CodeInstruction(OpCodes.Ldarg_1); yield return new CodeInstruction(OpCodes.Ldarg_1);
yield return new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(FindBestPartner_Patch), nameof(RelationshipThreshold))); yield return CodeInstruction.Call(typeof(FindBestPartner_Patch), nameof(RelationshipThreshold));
} }
else yield return instruction; else yield return instruction;
} }