Put a few nameof()s in the Harmony patches

This commit is contained in:
lutepickle 2022-04-27 11:08:59 -07:00
parent 1c24fab708
commit 1eaa459e04
4 changed files with 10 additions and 10 deletions

Binary file not shown.

View File

@ -7,7 +7,7 @@ using Verse;
namespace RJW_Menstruation
{
[HarmonyPatch(typeof(Pawn), "GetGizmos")]
[HarmonyPatch(typeof(Pawn), nameof(Pawn.GetGizmos))]
public class Pawn_GetGizmos
{
public static void Postfix(ref IEnumerable<Gizmo> __result, Pawn __instance)

View File

@ -10,7 +10,7 @@ using rjw;
namespace RJW_Menstruation
{
[HarmonyPatch(typeof(Pawn), "SpawnSetup")]
[HarmonyPatch(typeof(Pawn), nameof(Pawn.SpawnSetup))]
public class Pawn_Patch
{
public static void Postfix(Map map, bool respawningAfterLoad, Pawn __instance)

View File

@ -12,7 +12,7 @@ using System.Reflection.Emit;
namespace RJW_Menstruation
{
[HarmonyPatch(typeof(PregnancyHelper), "impregnate")]
[HarmonyPatch(typeof(PregnancyHelper), nameof(PregnancyHelper.impregnate))]
public static class Impregnate_Patch
{
public static bool Prefix(SexProps props)
@ -79,7 +79,7 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(PregnancyHelper), "Doimpregnate")]
[HarmonyPatch(typeof(PregnancyHelper), nameof(PregnancyHelper.Doimpregnate))]
public static class Doimpregnate_Patch
{
public static bool Prefix(Pawn pawn, Pawn partner) // partner has vagina
@ -101,7 +101,7 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(Hediff_BasePregnancy), "PostBirth")]
[HarmonyPatch(typeof(Hediff_BasePregnancy), nameof(Hediff_BasePregnancy.PostBirth))]
public static class RJW_Patch_PostBirth
{
public static void Postfix(Pawn mother, Pawn father, Pawn baby)
@ -115,7 +115,7 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(Quirk), "IsSatisfiedBy")]
[HarmonyPatch(typeof(Quirk), nameof(Quirk.IsSatisfiedBy))]
public static class IsSatisfiedBy_Patch
{
public static void Postfix(Quirk __instance, ref bool __result, Pawn pawn, Pawn partner)
@ -129,7 +129,7 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(Quirk), "CountSatisfiedQuirks")]
[HarmonyPatch(typeof(Quirk), nameof(Quirk.CountSatisfiedQuirks))]
public static class CountSatisfiedQuirks_Patch
{
public static void Postfix(ref int __result, SexProps props)
@ -179,7 +179,7 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(CasualSex_Helper), "roll_to_skip")]
[HarmonyPatch(typeof(CasualSex_Helper), nameof(CasualSex_Helper.roll_to_skip))]
public static class Roll_To_Skip_Patch
{
private static float FuckabilityThreshold(Pawn pawn, Pawn partner)
@ -208,7 +208,7 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(CasualSex_Helper), "FindBestPartner")]
[HarmonyPatch(typeof(CasualSex_Helper), nameof(CasualSex_Helper.FindBestPartner))]
public static class FindBestPartner_Patch
{
private static float AttractivenessThreshold(Pawn pawn, Pawn partner)
@ -250,7 +250,7 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(CompHediffBodyPart), "updatesize")]
[HarmonyPatch(typeof(CompHediffBodyPart), nameof(CompHediffBodyPart.updatesize))]
public static class Updatesize_Patch
{
public static void Postfix(CompHediffBodyPart __instance)