diff --git a/Defs/AnimationDefs/Animations_vanilla.xml b/Defs/AnimationDefs/Animations_vanilla.xml
index 7657f83..08b4870 100644
--- a/Defs/AnimationDefs/Animations_vanilla.xml
+++ b/Defs/AnimationDefs/Animations_vanilla.xml
@@ -23,6 +23,9 @@
true
true
+
+ (0, 0.2)
+
@@ -465,6 +468,9 @@
Human
+
+ (0, -0.2)
+
@@ -473,6 +479,9 @@
true
true
true
+
+ (0, 0.2)
+
@@ -879,6 +888,9 @@
Human
true
+
+ (0, 0.2)
+
@@ -886,6 +898,9 @@
true
true
+
+ (0, 0.2)
+
@@ -1984,6 +1999,9 @@
true
true
+
+ (0, 0.2)
+
@@ -1992,6 +2010,9 @@
true
true
+
+ (0, -0.2)
+
diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj
index 20d6133..6c2c621 100644
--- a/Rimworld-Animations.csproj
+++ b/Rimworld-Animations.csproj
@@ -69,6 +69,7 @@
+
@@ -87,6 +88,7 @@
+
diff --git a/Source/Actors/Actor.cs b/Source/Actors/Actor.cs
index 2cb548c..b3ff494 100644
--- a/Source/Actors/Actor.cs
+++ b/Source/Actors/Actor.cs
@@ -16,6 +16,7 @@ namespace Rimworld_Animations {
public bool isFucking = false;
public bool isFucked = false;
public bool controlGenitalAngle = false;
+ public BodyTypeOffset bodyTypeOffset = new BodyTypeOffset();
public Vector3 offset = new Vector2(0, 0);
}
}
diff --git a/Source/Actors/BodyTypeOffset.cs b/Source/Actors/BodyTypeOffset.cs
new file mode 100644
index 0000000..82a23a3
--- /dev/null
+++ b/Source/Actors/BodyTypeOffset.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Rimworld_Animations {
+ public class BodyTypeOffset {
+
+ public Vector2? Male;
+ public Vector2? Female;
+ public Vector2? Thin;
+ public Vector2? Hulk;
+ public Vector2? Fat;
+
+ }
+}
diff --git a/Source/AnimationUtility.cs b/Source/AnimationUtility.cs
index df9b5a8..6f40e3b 100644
--- a/Source/AnimationUtility.cs
+++ b/Source/AnimationUtility.cs
@@ -78,10 +78,10 @@ namespace Rimworld_Animations {
//TESTING ANIMATIONS ONLY REMEMBER TO COMMENT OUT BEFORE PUSH
/*
- if (x.defName != "Cowgirl")
+ if (x.defName != "Doggystyle")
return false;
- */
+ */
if (x.actors[i].isFucking && !rjw.xxx.can_fuck(localParticipants[i])) {
Log.Message(x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " can't fuck");
diff --git a/Source/Comps/CompBodyAnimator.cs b/Source/Comps/CompBodyAnimator.cs
index 7a2f2c4..730b2ab 100644
--- a/Source/Comps/CompBodyAnimator.cs
+++ b/Source/Comps/CompBodyAnimator.cs
@@ -105,6 +105,30 @@ namespace Rimworld_Animations {
anchor.z += raceOffset.offset.y;
}
+ //change the offset based on pawn body type
+ if(pawn?.story?.bodyType != null) {
+ if (pawn.story.bodyType == BodyTypeDefOf.Fat && anim?.actors[actor]?.bodyTypeOffset?.Fat != null) {
+ anchor.x += anim.actors[actor].bodyTypeOffset.Fat.Value.x * (mirror ? -1f : 1f);
+ anchor.z += anim.actors[actor].bodyTypeOffset.Fat.Value.y;
+ }
+ else if (pawn.story.bodyType == BodyTypeDefOf.Female && anim?.actors[actor]?.bodyTypeOffset?.Female != null) {
+ anchor.x += anim.actors[actor].bodyTypeOffset.Female.Value.x * (mirror ? -1f : 1f);
+ anchor.z += anim.actors[actor].bodyTypeOffset.Female.Value.y;
+ }
+ else if (pawn.story.bodyType == BodyTypeDefOf.Male && anim?.actors[actor]?.bodyTypeOffset?.Male != null) {
+ anchor.x += anim.actors[actor].bodyTypeOffset.Male.Value.x * (mirror ? -1f : 1f);
+ anchor.z += anim.actors[actor].bodyTypeOffset.Male.Value.y;
+ }
+ else if (pawn.story.bodyType == BodyTypeDefOf.Thin && anim?.actors[actor]?.bodyTypeOffset?.Thin != null) {
+ anchor.x += anim.actors[actor].bodyTypeOffset.Thin.Value.x * (mirror ? -1f : 1f);
+ anchor.z += anim.actors[actor].bodyTypeOffset.Thin.Value.y;
+ }
+ else if (pawn.story.bodyType == BodyTypeDefOf.Hulk && anim?.actors[actor]?.bodyTypeOffset?.Hulk != null) {
+ anchor.x += anim.actors[actor].bodyTypeOffset.Hulk.Value.x * (mirror ? -1f : 1f);
+ anchor.z += anim.actors[actor].bodyTypeOffset.Hulk.Value.y;
+ }
+ }
+
pawn.jobs.posture = PawnPosture.Standing;
this.actor = actor;
diff --git a/Source/Patches/HarmonyPatch_DontShaveYourHead.cs b/Source/Patches/HarmonyPatch_DontShaveYourHead.cs
new file mode 100644
index 0000000..fa5a5cc
--- /dev/null
+++ b/Source/Patches/HarmonyPatch_DontShaveYourHead.cs
@@ -0,0 +1,29 @@
+using HarmonyLib;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Verse;
+
+namespace Rimworld_Animations {
+ class HarmonyPatch_DontShaveYourHead {
+
+ [StaticConstructorOnStartup]
+ public static class Patch_DontShaveYourHead {
+
+ static Patch_DontShaveYourHead() {
+ try {
+ ((Action)(() =>
+ {
+ if (LoadedModManager.RunningModsListForReading.Any(x => x.Name == "Don't Shave Your Head 1.0")) {
+ (new Harmony("rjw")).Patch(AccessTools.Method(AccessTools.TypeByName("DontShaveYourHead.Harmony_PawnRenderer"), "DrawHairReroute"), //typeof(ShowHair.Patch_PawnRenderer_RenderPawnInternal), nameof(ShowHair.Patch_PawnRenderer_RenderPawnInternal.Postfix)),
+ transpiler: new HarmonyMethod(AccessTools.Method(typeof(Patch_ShowHairWithHats), "Transpiler")));
+ }
+ }))();
+ }
+ catch (TypeLoadException ex) { }
+ }
+ }
+ }
+}