mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
better wound (semen) drawing
This commit is contained in:
parent
414cf3dce4
commit
89d93091b0
3 changed files with 29 additions and 0 deletions
Binary file not shown.
|
@ -92,6 +92,7 @@
|
||||||
<Compile Include="Source\Patches\HarmonyPatch_AlienRace.cs" />
|
<Compile Include="Source\Patches\HarmonyPatch_AlienRace.cs" />
|
||||||
<Compile Include="Source\Patches\HarmonyPatch_FacialAnimation.cs" />
|
<Compile Include="Source\Patches\HarmonyPatch_FacialAnimation.cs" />
|
||||||
<Compile Include="Source\Patches\HarmonyPatch_PawnRenderer.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_Pawn_DrawTracker.cs" />
|
||||||
<Compile Include="Source\Patches\HarmonyPatch_ShowHairWithHats.cs" />
|
<Compile Include="Source\Patches\HarmonyPatch_ShowHairWithHats.cs" />
|
||||||
<Compile Include="Source\Patches\Harmony_PatchAll.cs" />
|
<Compile Include="Source\Patches\Harmony_PatchAll.cs" />
|
||||||
|
|
28
Source/Patches/HarmonyPatch_PawnRotation.cs
Normal file
28
Source/Patches/HarmonyPatch_PawnRotation.cs
Normal 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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue