mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
fixed issue with HAR as a soft dependency stopping resolveapparelgraphics patch from working
24 lines
522 B
C#
24 lines
522 B
C#
using HarmonyLib;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Verse;
|
|
|
|
namespace Rimworld_Animations
|
|
{
|
|
[HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")]
|
|
public static class HarmonyPatch_ResolveApparelGraphics
|
|
{
|
|
public static bool Prefix(ref Pawn ___pawn)
|
|
{
|
|
|
|
if (___pawn.TryGetComp<CompBodyAnimator>() != null && ___pawn.TryGetComp<CompBodyAnimator>().isAnimating)
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
}
|