diff --git a/1.4/Assemblies/Rimworld-Animations.dll b/1.4/Assemblies/Rimworld-Animations.dll index a9a9145..e8a8a1f 100644 Binary files a/1.4/Assemblies/Rimworld-Animations.dll and b/1.4/Assemblies/Rimworld-Animations.dll differ diff --git a/1.4/Defs/SoundDefs/Sounds_Sex.xml b/1.4/Defs/SoundDefs/Sounds_Sex.xml index 4cce5d0..f05a1a8 100644 --- a/1.4/Defs/SoundDefs/Sounds_Sex.xml +++ b/1.4/Defs/SoundDefs/Sounds_Sex.xml @@ -10,8 +10,8 @@
  • -
  • - Sex/cum +
  • + Sex/cum
  • @@ -39,8 +39,8 @@
  • -
  • - Sex/kucyu04 +
  • + Sex/kucyu04
  • @@ -68,35 +68,35 @@
  • -
  • - Sex/Suck/Suck_1 +
  • + Sex/Suck/Suck_1
  • -
  • - Sex/Suck/Suck_2 +
  • + Sex/Suck/Suck_2
  • -
  • - Sex/Suck/Suck_3 +
  • + Sex/Suck/Suck_3
  • -
  • - Sex/Suck/Suck_4 +
  • + Sex/Suck/Suck_4
  • -
  • - Sex/Suck/Suck_5 +
  • + Sex/Suck/Suck_5
  • -
  • - Sex/Suck/Suck_6 +
  • + Sex/Suck/Suck_6
  • -
  • - Sex/Suck/Suck_7 +
  • + Sex/Suck/Suck_7
  • -
  • - Sex/Suck/Suck_8 +
  • + Sex/Suck/Suck_8
  • -
  • - Sex/Suck/Suck_9 +
  • + Sex/Suck/Suck_9
  • -
  • - Sex/Suck/Suck_10 +
  • + Sex/Suck/Suck_10
  • @@ -125,29 +125,29 @@
  • -
  • - Sex/Clap_1 +
  • + Sex/Clap_1
  • -
  • - Sex/Clap_2 +
  • + Sex/Clap_2
  • -
  • - Sex/Clap_3 +
  • + Sex/Clap_3
  • -
  • - Sex/Clap_4 +
  • + Sex/Clap_4
  • -
  • - Sex/Clap_5 +
  • + Sex/Clap_5
  • -
  • - Sex/Clap_6 +
  • + Sex/Clap_6
  • -
  • - Sex/Clap_7 +
  • + Sex/Clap_7
  • -
  • - Sex/Clap_8 +
  • + Sex/Clap_8
  • @@ -176,20 +176,20 @@
  • -
  • - Sex/Slime/Slimy1 +
  • + Sex/Slime/Slimy1
  • -
  • - Sex/Slime/Slimy2 +
  • + Sex/Slime/Slimy2
  • -
  • - Sex/Slime/Slimy3 +
  • + Sex/Slime/Slimy3
  • -
  • - Sex/Slime/Slimy4 +
  • + Sex/Slime/Slimy4
  • -
  • - Sex/Slime/Slimy5 +
  • + Sex/Slime/Slimy5
  • diff --git a/1.4/Source/Extensions/PawnWoundDrawerExtension.cs b/1.4/Source/Extensions/PawnWoundDrawerExtension.cs index 4901de2..45c93e7 100644 --- a/1.4/Source/Extensions/PawnWoundDrawerExtension.cs +++ b/1.4/Source/Extensions/PawnWoundDrawerExtension.cs @@ -7,6 +7,7 @@ using Rimworld_Animations; namespace Rimworld_Animations { + /* todo: fix for 1.4 [StaticConstructorOnStartup] public static class PawnWoundDrawerExtension { @@ -15,7 +16,7 @@ namespace Rimworld_Animations if (pawn == null) { return; } - if (!flags.FlagSet(PawnRenderFlags.Portrait) && layer == BodyTypeDef.WoundLayer.Head) + if (!flags.FlagSet(PawnRenderFlags.Portrait) && layer == BodyTypeDef.WoundAnchor.) { CompBodyAnimator pawnAnimator = pawn.TryGetComp(); if (pawnAnimator != null && pawnAnimator.isAnimating && pawn.Drawer.renderer.graphics.headGraphic != null) @@ -31,4 +32,6 @@ namespace Rimworld_Animations pawnWoundDrawer.RenderOverBody(drawLoc, bodyMesh, quat, drawNow, layer, pawnRot, overApparel); } } + + */ } diff --git a/1.4/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs b/1.4/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs index b7198da..486bd82 100644 --- a/1.4/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs +++ b/1.4/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs @@ -18,12 +18,40 @@ namespace Rimworld_Animations { { static HarmonyPatch_AlienRace() { + /* (new Harmony("rjwanim")).Patch(AccessTools.Method(AccessTools.TypeByName("AlienRace.HarmonyPatches"), "DrawAddons"), prefix: new HarmonyMethod(AccessTools.Method(typeof(HarmonyPatch_AlienRace), "Prefix_AnimateHeadAddons"))); + + */ } + public static void Prefix_DrawAddonsFinalHook(ref Pawn pawn, ref AlienPartGenerator.BodyAddon addon, ref Rot4 rot, ref Graphic graphic, ref Vector3 offsetVector, ref float angle, ref Material mat) + { + CompBodyAnimator animator = pawn.TryGetComp(); - public static bool Prefix_AnimateHeadAddons(PawnRenderFlags renderFlags, Vector3 vector /*rootloc*/, Vector3 headOffset, Pawn pawn, Quaternion quat, Rot4 rotation) + if (animator == null || !animator.isAnimating) + { + return; + } + + if(addon.alignWithHead || addon.drawnInBed) + { + rot = animator.headFacing; + angle = animator.headAngle; + offsetVector += angle * animator.headBob; + + } + else + { + rot = animator.bodyFacing; + angle = animator.bodyAngle; + offsetVector += animator.deltaPos; + } + + } + + /* + public static bool Prefix_AnimateHeadAddons(PawnRenderFlags renderFlags, Vector3 vector, Vector3 headOffset, Pawn pawn, Quaternion quat, Rot4 rotation) { if (renderFlags.FlagSet(PawnRenderFlags.Portrait) || pawn.TryGetComp() == null || !pawn.TryGetComp().isAnimating) return true; @@ -130,17 +158,8 @@ namespace Rimworld_Animations { { Quaternion addonRotation = Quaternion.AngleAxis(pawnAnimator.headAngle < 0 ? 360 - (360 % pawnAnimator.headAngle) : pawnAnimator.headAngle, Vector3.up); - /* - * - * genital rotation is borked - if (AnimationSettings.controlGenitalRotation && pawnAnimator.controlGenitalAngle && ba?.hediffGraphics != null && ba.hediffGraphics.Count != 0 && ba.hediffGraphics[0]?.path != null && (ba.hediffGraphics[0].path.Contains("Penis") || ba.hediffGraphics[0].path.Contains("penis"))) - { - addonRotation = Quaternion.AngleAxis(angle: pawnAnimator.genitalAngle < 0 ? 360 - (360 % pawnAnimator.genitalAngle) : pawnAnimator.genitalAngle, axis: Vector3.up); - } - */ - - GenDraw.DrawMeshNowOrLater(mesh: addonGraphic.MeshAt(rot: pawnAnimator.headFacing), loc: vector /*rootloc*/ + orassanv + (ba.alignWithHead && !orassan ? headOffset : headOffset - addonRotation * pawn.Drawer.renderer.BaseHeadOffsetAt(pawnAnimator.headFacing)) + vector2.RotatedBy(angle: Mathf.Acos(f: Quaternion.Dot(a: Quaternion.identity, b: addonRotation)) * 2f * 57.29578f), + GenDraw.DrawMeshNowOrLater(mesh: addonGraphic.MeshAt(rot: pawnAnimator.headFacing), loc: vector + orassanv + (ba.alignWithHead && !orassan ? headOffset : headOffset - addonRotation * pawn.Drawer.renderer.BaseHeadOffsetAt(pawnAnimator.headFacing)) + vector2.RotatedBy(angle: Mathf.Acos(f: Quaternion.Dot(a: Quaternion.identity, b: addonRotation)) * 2f * 57.29578f), quat: Quaternion.AngleAxis(angle: num, axis: Vector3.up) * addonRotation, mat: addonGraphic.MatAt(rot: pawnAnimator.headFacing), renderFlags.FlagSet(PawnRenderFlags.DrawNow)); @@ -168,6 +187,8 @@ namespace Rimworld_Animations { return false; } + + */ } [HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")] diff --git a/1.4/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs b/1.4/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs index d328d2b..dfa116e 100644 --- a/1.4/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs +++ b/1.4/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs @@ -8,6 +8,7 @@ using RimWorld; using Verse; using rjw; using System.Reflection.Emit; +using Verse.AI; namespace Rimworld_Animations { @@ -15,16 +16,16 @@ namespace Rimworld_Animations [HarmonyPatch(typeof(JobDriver_SexBaseRecieverLoved), "MakeSexToil")] public static class HarmonyPatch_JobDriver_SexBaseReceiverLoved { - public static IEnumerable Transpiler(IEnumerable codeInstructions) { var ins = codeInstructions.ToList(); for(int i = 0; i < ins.Count; i++) { - if(i + 13 < ins.Count && ins[i + 13].opcode == OpCodes.Call && ins[i + 13].OperandIs(AccessTools.DeclaredMethod(typeof(Toils_LayDown), "LayDown"))) { + if(i < ins.Count && ins[i].opcode == OpCodes.Call && ins[i].OperandIs(AccessTools.DeclaredMethod(typeof(Toils_LayDown), "LayDown"))) { - ins.RemoveRange(i, 14); + ins[i].operand = AccessTools.DeclaredMethod(typeof(HarmonyPatch_JobDriver_SexBaseReceiverLoved), "DoNotLayDown"); + yield return ins[i]; } @@ -36,5 +37,10 @@ namespace Rimworld_Animations } + public static Toil DoNotLayDown(TargetIndex bedOrRestSpotIndex, bool hasBed, bool lookForOtherJobs, bool canSleep = true, bool gainRestAndHealth = true, PawnPosture noBedLayingPosture = PawnPosture.LayingMask, bool deathrest = false) + { + return new Toil(); + } + } } diff --git a/1.4/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderer.cs b/1.4/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderer.cs index 218e45b..d334621 100644 --- a/1.4/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderer.cs +++ b/1.4/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderer.cs @@ -63,7 +63,7 @@ namespace Rimworld_Animations { yield return ins[i]; //headFacing equals true } - + /* // Fixes the offsets for eye implants and wounds on the head during animations else if (ins[i].opcode == OpCodes.Callvirt && ins[i].operand != null && ins[i].OperandIs(AccessTools.DeclaredMethod(typeof(PawnWoundDrawer), "RenderOverBody"))) { @@ -73,7 +73,7 @@ namespace Rimworld_Animations { yield return new CodeInstruction(OpCodes.Ldarg_S, (object)6); // renderer flags yield return new CodeInstruction(OpCodes.Call, AccessTools.DeclaredMethod(typeof(PawnWoundDrawerExtension), "RenderOverBody")); } - + */ else { yield return ins[i]; diff --git a/LoadFolders.xml b/LoadFolders.xml index 7d24a0a..4fad350 100644 --- a/LoadFolders.xml +++ b/LoadFolders.xml @@ -21,7 +21,7 @@
  • 1.4
  • Patch_HatsDisplaySelection/1.2
  • Patch_SexToysMasturbation
  • -
  • Patch_SexToysMasturbation/1.3
  • +
  • Patch_SexToysMasturbation/1.4
  • diff --git a/Patch_SexToysMasturbation/1.3/Assemblies/Patch_SexToysMasturbation.dll b/Patch_SexToysMasturbation/1.3/Assemblies/Patch_SexToysMasturbation.dll index b7c0a4e..723e4ee 100644 Binary files a/Patch_SexToysMasturbation/1.3/Assemblies/Patch_SexToysMasturbation.dll and b/Patch_SexToysMasturbation/1.3/Assemblies/Patch_SexToysMasturbation.dll differ diff --git a/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj b/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj index 8f23ccb..9509bd9 100644 --- a/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj +++ b/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj @@ -17,7 +17,7 @@ false none false - 1.3\Assemblies\ + 1.4\Assemblies\ DEBUG;TRACE prompt 4 @@ -73,8 +73,8 @@ - + diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj index 91ee132..8680e4e 100644 --- a/Rimworld-Animations.csproj +++ b/Rimworld-Animations.csproj @@ -9,9 +9,10 @@ Properties Rimworld_Animations Rimworld-Animations - v4.7.2 + v4.8 512 true + false @@ -32,11 +33,11 @@ - ..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll + ..\..\..\..\workshop\content\294100\839005762\1.4\Assemblies\0Harmony.dll False - ..\..\..\..\workshop\content\294100\839005762\1.3\Assemblies\AlienRace.dll + ..\..\..\..\workshop\content\294100\839005762\1.4\Assemblies\AlienRace.dll False