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 1bb78ac..1cd8c2d 100644 Binary files a/1.4/Assemblies/Rimworld-Animations.dll and b/1.4/Assemblies/Rimworld-Animations.dll differ diff --git a/1.4/Source/MainTabWindows/MainTabWindow_OffsetConfigure.cs b/1.4/Source/MainTabWindows/MainTabWindow_OffsetConfigure.cs index b7fef1d..a800a55 100644 --- a/1.4/Source/MainTabWindows/MainTabWindow_OffsetConfigure.cs +++ b/1.4/Source/MainTabWindows/MainTabWindow_OffsetConfigure.cs @@ -60,7 +60,7 @@ namespace Rimworld_Animations { bool mirrored = curPawn.TryGetComp().Mirror; float.TryParse(listingStandard.TextEntryLabeled("X Offset: ", offsetX.ToString()), out offsetX); - offsetX = listingStandard.Slider(offsetX, -2 * (mirrored ? -1 : 1), 2 * (mirrored ? -1 : 1)); + offsetX = listingStandard.Slider(offsetX, -2, 2); float.TryParse(listingStandard.TextEntryLabeled("Z Offset: ", offsetZ.ToString()), out offsetZ); offsetZ = listingStandard.Slider(offsetZ, -2, 2); diff --git a/1.4/Source/Patches/RimworldPatches/HarmonyPatch_ResolveApparelGraphics.cs b/1.4/Source/Patches/RimworldPatches/HarmonyPatch_ResolveApparelGraphics.cs new file mode 100644 index 0000000..0f5d978 --- /dev/null +++ b/1.4/Source/Patches/RimworldPatches/HarmonyPatch_ResolveApparelGraphics.cs @@ -0,0 +1,24 @@ +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Verse; + +namespace Rimworld_Animations +{ + [HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")] + public static class HarmonyPatch_ResolveApparelGraphics + { + public static bool Prefix(ref Pawn ___pawn) + { + + if (___pawn.TryGetComp() != null && ___pawn.TryGetComp().isAnimating) + { + return false; + } + return true; + } + } +} diff --git a/Patch_HumanoidAlienRaces/1.4/Assemblies/Patch_HumanoidAlienRaces.dll b/Patch_HumanoidAlienRaces/1.4/Assemblies/Patch_HumanoidAlienRaces.dll index 477a0bd..fcda602 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_HumanoidAlienRaces/Source/HarmonyPatch_AlienRace.cs b/Patch_HumanoidAlienRaces/Source/HarmonyPatch_AlienRace.cs index c4b6985..8ab0255 100644 --- a/Patch_HumanoidAlienRaces/Source/HarmonyPatch_AlienRace.cs +++ b/Patch_HumanoidAlienRaces/Source/HarmonyPatch_AlienRace.cs @@ -139,19 +139,7 @@ namespace Rimworld_Animations { } } - [HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")] - public static class HarmonyPatch_ResolveApparelGraphics - { - public static bool Prefix(ref Pawn ___pawn) - { - if (___pawn.TryGetComp() != null && ___pawn.TryGetComp().isAnimating) - { - return false; - } - return true; - } - } /* diff --git a/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll b/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll index bc0a34d..99b7395 100644 Binary files a/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll and b/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll differ diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj index 8acd526..657ccf2 100644 --- a/Rimworld-Animations.csproj +++ b/Rimworld-Animations.csproj @@ -99,6 +99,7 @@ +