mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
e8fd61fb4a
- added extended functionality for head rotations, invisible - tentative design for groupanimationdefs
27 lines
908 B
C#
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;
|
|
}
|
|
}
|
|
}
|