Skip to content
Snippets Groups Projects
Commit 022e6cf5 authored by Ed86's avatar Ed86
Browse files

patch for animal mating

parent c6264444
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,20 @@ namespace rjw
}
}
[HarmonyPatch(typeof(JobDriver_Mate))]
[HarmonyPatch("MakeNewToils")]
internal static class PATCH_JobDriver_Mate_MakeNewToils
{
[HarmonyPrefix]
private static bool on_begin_lovin(JobDriver_Mate __instance)
{
//--Log.Message("[RJW]patches_lovin::PATCH_JobDriver_Mate_MakeNewToils is called");
//if (__instance == null) return true;
__instance.FailOn(() => (!(xxx.can_fuck(__instance.pawn) || xxx.can_be_fucked(__instance.pawn))));
return true;
}
}
//JobDriver_DoLovinCasual from RomanceDiversified should have handled whether pawns can do casual lovin,
//so I don't bothered to do a check here, unless some bugs occur due to this.
......@@ -43,6 +57,9 @@ namespace rjw
//vanilla lovin
private readonly static Type JobDriverLovin = typeof(JobDriver_Lovin);
//vanilla mate
private readonly static Type JobDriverMate = typeof(JobDriver_Mate);
[HarmonyPrefix]
private static bool on_cleanup_driver(JobDriver __instance, JobCondition condition)
{
......@@ -77,6 +94,10 @@ namespace rjw
PregnancyHelper.cleanup_CnP(partner);
}
}
//Vanilla mating
else if (__instance.GetType() == JobDriverMate)
{
}
else
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment