better wound (semen) drawing

This commit is contained in:
Platinum 2020-04-28 09:44:14 -07:00
parent 414cf3dce4
commit 89d93091b0
3 changed files with 29 additions and 0 deletions

View file

@ -92,6 +92,7 @@
<Compile Include="Source\Patches\HarmonyPatch_AlienRace.cs" />
<Compile Include="Source\Patches\HarmonyPatch_FacialAnimation.cs" />
<Compile Include="Source\Patches\HarmonyPatch_PawnRenderer.cs" />
<Compile Include="Source\Patches\HarmonyPatch_PawnRotation.cs" />
<Compile Include="Source\Patches\HarmonyPatch_Pawn_DrawTracker.cs" />
<Compile Include="Source\Patches\HarmonyPatch_ShowHairWithHats.cs" />
<Compile Include="Source\Patches\Harmony_PatchAll.cs" />

View file

@ -0,0 +1,28 @@
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(Thing), "Rotation", MethodType.Getter)]
public static class HarmonyPatch_PawnRotation {
public static bool Prefix(Thing __instance, ref Rot4 __result) {
if(!(__instance is Pawn) || (__instance as Pawn)?.TryGetComp<CompBodyAnimator>() == null || !(__instance as Pawn).TryGetComp<CompBodyAnimator>().isAnimating) {
return true;
}
Pawn pawn = (__instance as Pawn);
__result = pawn.TryGetComp<CompBodyAnimator>().bodyFacing;
return false;
}
}
}