mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
28 lines
614 B
C#
28 lines
614 B
C#
using HarmonyLib;
|
|
using Verse;
|
|
using RimWorld;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Rimworld_Animations
|
|
{
|
|
[HarmonyPatch(typeof(PawnUtility), "GetPosture")]
|
|
public static class HarmonyPatch_SetPawnLaying
|
|
{
|
|
|
|
public static bool Prefix(Pawn p, ref PawnPosture __result)
|
|
{
|
|
if(p.TryGetComp<CompBodyAnimator>().isAnimating)
|
|
{
|
|
__result = PawnPosture.LayingOnGroundNormal;
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|
|
}
|