rimworld-animations/1.5/Source/Patches/RimworldPatches/HarmonyPatch_Pawn_DrawTracker.cs
c0ffee e8fd61fb4a Rewrote anim framework to use vanilla animation system
- added extended functionality for head rotations, invisible
 - tentative design for groupanimationdefs
2024-04-16 15:10:46 -07:00

27 lines
908 B
C#

using HarmonyLib;
using rjw;
using UnityEngine;
using Verse;
namespace Rimworld_Animations {
[HarmonyPatch(typeof(Pawn_DrawTracker), "DrawPos", MethodType.Getter)]
public static class HarmonyPatch_Pawn_DrawTracker {
public static bool Prefix(ref Pawn ___pawn, ref Vector3 __result) {
if (___pawn?.Drawer?.renderer?.renderTree?.rootNode?.AnimationWorker is AnimationWorker_KeyframesExtended
&& ___pawn.jobs?.curDriver is JobDriver_SexBaseInitiator sexdriver)
{
//align pos on top of partner
__result = sexdriver.Partner.Drawer.DrawPos;
//change height so that they're all layered properly
if (sexdriver.Partner.jobs.curDriver is JobDriver_SexBaseReciever)
for (int i = 0; i < )
return false;
}
return true;
}
}
}