diff --git a/1.3/Source/Comps/CompBodyAnimator.cs b/1.3/Source/Comps/CompBodyAnimator.cs index 7910f7d..3e95bf5 100644 --- a/1.3/Source/Comps/CompBodyAnimator.cs +++ b/1.3/Source/Comps/CompBodyAnimator.cs @@ -504,14 +504,29 @@ namespace Rimworld_Animations { public bool LoopNeverending() { - if(pawn?.jobs?.curDriver != null && - (pawn.jobs.curDriver is JobDriver_Sex) && (pawn.jobs.curDriver as JobDriver_Sex).neverendingsex || - (pawn.jobs.curDriver is JobDriver_SexBaseReciever) && (pawn.jobs.curDriver as JobDriver_Sex).Partner?.jobs?.curDriver != null && ((pawn.jobs.curDriver as JobDriver_Sex).Partner.jobs.curDriver as JobDriver_Sex).neverendingsex) - { - return true; - } + return IsNeverEndingSex(pawn) || IsNeverEndingSexPartner(pawn); + } - return false; + public static bool IsNeverEndingSex(Pawn pawn) + { + bool hasDriver = pawn?.jobs?.curDriver != null; + if (!hasDriver) + return false; + + return (pawn.jobs.curDriver is JobDriver_Sex jds) && jds.neverendingsex; + } + + public static bool IsNeverEndingSexPartner(Pawn pawn) + { + bool hasDriver = pawn?.jobs?.curDriver != null; + if (!hasDriver) + return false; + + var partner = (pawn.jobs.curDriver is JobDriver_SexBaseReciever jds) ? jds.Partner : null; + if (partner == null) + return false; + + return IsNeverEndingSex(partner); } public void ResetOnLoop() diff --git a/1.4/Assemblies/Rimworld-Animations.dll b/1.4/Assemblies/Rimworld-Animations.dll index 6aacdcf..cfec529 100644 Binary files a/1.4/Assemblies/Rimworld-Animations.dll and b/1.4/Assemblies/Rimworld-Animations.dll differ diff --git a/About/Manifest.xml b/About/Manifest.xml index 99a4330..755ff76 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,5 +1,5 @@ Rimworld-Animations - 1.3.3 + 1.3.4 diff --git a/Patch_HumanoidAlienRaces/1.4/Assemblies/Patch_HumanoidAlienRaces.dll b/Patch_HumanoidAlienRaces/1.4/Assemblies/Patch_HumanoidAlienRaces.dll index 2736148..221ddb1 100644 Binary files a/Patch_HumanoidAlienRaces/1.4/Assemblies/Patch_HumanoidAlienRaces.dll and b/Patch_HumanoidAlienRaces/1.4/Assemblies/Patch_HumanoidAlienRaces.dll differ diff --git a/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll b/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll index 5543661..a9d0d5f 100644 Binary files a/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll and b/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll differ