diff --git a/1.4/Assemblies/Rimworld-Animations.dll b/1.4/Assemblies/Rimworld-Animations.dll index e8a8a1f..a9a9145 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 f05a1a8..4cce5d0 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 45c93e7..4901de2 100644 --- a/1.4/Source/Extensions/PawnWoundDrawerExtension.cs +++ b/1.4/Source/Extensions/PawnWoundDrawerExtension.cs @@ -7,7 +7,6 @@ using Rimworld_Animations; namespace Rimworld_Animations { - /* todo: fix for 1.4 [StaticConstructorOnStartup] public static class PawnWoundDrawerExtension { @@ -16,7 +15,7 @@ namespace Rimworld_Animations if (pawn == null) { return; } - if (!flags.FlagSet(PawnRenderFlags.Portrait) && layer == BodyTypeDef.WoundAnchor.) + if (!flags.FlagSet(PawnRenderFlags.Portrait) && layer == BodyTypeDef.WoundLayer.Head) { CompBodyAnimator pawnAnimator = pawn.TryGetComp(); if (pawnAnimator != null && pawnAnimator.isAnimating && pawn.Drawer.renderer.graphics.headGraphic != null) @@ -32,6 +31,4 @@ 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 486bd82..b7198da 100644 --- a/1.4/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs +++ b/1.4/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs @@ -18,40 +18,12 @@ 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(); - 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) + public static bool Prefix_AnimateHeadAddons(PawnRenderFlags renderFlags, Vector3 vector /*rootloc*/, Vector3 headOffset, Pawn pawn, Quaternion quat, Rot4 rotation) { if (renderFlags.FlagSet(PawnRenderFlags.Portrait) || pawn.TryGetComp() == null || !pawn.TryGetComp().isAnimating) return true; @@ -158,8 +130,17 @@ 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 + 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 /*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), quat: Quaternion.AngleAxis(angle: num, axis: Vector3.up) * addonRotation, mat: addonGraphic.MatAt(rot: pawnAnimator.headFacing), renderFlags.FlagSet(PawnRenderFlags.DrawNow)); @@ -187,8 +168,6 @@ 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 dfa116e..d328d2b 100644 --- a/1.4/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs +++ b/1.4/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs @@ -8,7 +8,6 @@ using RimWorld; using Verse; using rjw; using System.Reflection.Emit; -using Verse.AI; namespace Rimworld_Animations { @@ -16,16 +15,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 < ins.Count && ins[i].opcode == OpCodes.Call && ins[i].OperandIs(AccessTools.DeclaredMethod(typeof(Toils_LayDown), "LayDown"))) { + if(i + 13 < ins.Count && ins[i + 13].opcode == OpCodes.Call && ins[i + 13].OperandIs(AccessTools.DeclaredMethod(typeof(Toils_LayDown), "LayDown"))) { - ins[i].operand = AccessTools.DeclaredMethod(typeof(HarmonyPatch_JobDriver_SexBaseReceiverLoved), "DoNotLayDown"); - yield return ins[i]; + ins.RemoveRange(i, 14); } @@ -37,10 +36,5 @@ 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 d334621..218e45b 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 4fad350..7d24a0a 100644 --- a/LoadFolders.xml +++ b/LoadFolders.xml @@ -21,7 +21,7 @@
  • 1.4
  • Patch_HatsDisplaySelection/1.2
  • Patch_SexToysMasturbation
  • -
  • Patch_SexToysMasturbation/1.4
  • +
  • Patch_SexToysMasturbation/1.3
  • diff --git a/Patch_SexToysMasturbation/1.3/Assemblies/Patch_SexToysMasturbation.dll b/Patch_SexToysMasturbation/1.3/Assemblies/Patch_SexToysMasturbation.dll index 723e4ee..b7c0a4e 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/1.4/Assemblies/Patch_SexToysMasturbation.dll b/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll deleted file mode 100644 index dd12e73..0000000 Binary files a/Patch_SexToysMasturbation/1.4/Assemblies/Patch_SexToysMasturbation.dll and /dev/null differ diff --git a/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj b/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj index 9509bd9..8f23ccb 100644 --- a/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj +++ b/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj @@ -17,7 +17,7 @@ false none false - 1.4\Assemblies\ + 1.3\Assemblies\ DEBUG;TRACE prompt 4 @@ -73,8 +73,8 @@ - + diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj index 8680e4e..91ee132 100644 --- a/Rimworld-Animations.csproj +++ b/Rimworld-Animations.csproj @@ -9,10 +9,9 @@ Properties Rimworld_Animations Rimworld-Animations - v4.8 + v4.7.2 512 true - false @@ -33,11 +32,11 @@ - ..\..\..\..\workshop\content\294100\839005762\1.4\Assemblies\0Harmony.dll + ..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll False - ..\..\..\..\workshop\content\294100\839005762\1.4\Assemblies\AlienRace.dll + ..\..\..\..\workshop\content\294100\839005762\1.3\Assemblies\AlienRace.dll False