From c6874f626edb69becde960c5e79ed9665e20855b Mon Sep 17 00:00:00 2001 From: amevarashi Date: Mon, 20 Jun 2022 09:56:14 +0500 Subject: [PATCH] Fix RJW_Patch_ThinkNode_ChancePerHour_Fappin --- .../Ideology/Patches/RJW_Patch_ChancePerHour.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/RJWSexperience/IdeologyAddon/Ideology/Patches/RJW_Patch_ChancePerHour.cs b/RJWSexperience/IdeologyAddon/Ideology/Patches/RJW_Patch_ChancePerHour.cs index dbdd4b5..296b474 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/Patches/RJW_Patch_ChancePerHour.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/Patches/RJW_Patch_ChancePerHour.cs @@ -41,9 +41,12 @@ namespace RJWSexperience.Ideology.Patches [HarmonyPatch(typeof(ThinkNode_ChancePerHour_Fappin), "MtbHours")] public static class RJW_Patch_ThinkNode_ChancePerHour_Fappin { - public static void Postfix(Pawn pawn, ref float __result) + public static void Postfix(Pawn p, ref float __result) { - Ideo ideo = pawn.Ideo; + if (__result < 0f) + return; + + Ideo ideo = p.Ideo; if (ideo != null) // ideo is null if don't have dlc __result *= IdeoUtility.GetPreceptsMtbMultiplier(ideo); }