merging master to no har

This commit is contained in:
Platinum 2020-04-28 23:35:57 -07:00
commit c1d4af9b72
11 changed files with 132 additions and 23 deletions

View file

@ -471,6 +471,7 @@
<li>Human</li> <li>Human</li>
</defNames> </defNames>
<isFucking>true</isFucking> <isFucking>true</isFucking>
<controlGenitalAngle>true</controlGenitalAngle>
<initiator>true</initiator> <initiator>true</initiator>
</li> </li>
</actors> </actors>
@ -622,6 +623,7 @@
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>90</genitalAngle>
</li> </li>
<li> <li>
<tickDuration>59</tickDuration> <tickDuration>59</tickDuration>
@ -641,6 +643,7 @@
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>90</genitalAngle>
</li> </li>
</keyframes> </keyframes>
</li> </li>
@ -698,6 +701,7 @@
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>90</genitalAngle>
</li> </li>
<li> <li>
<tickDuration>14</tickDuration> <tickDuration>14</tickDuration>
@ -717,6 +721,7 @@
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>90</genitalAngle>
</li> </li>
</keyframes> </keyframes>
</li> </li>
@ -801,6 +806,7 @@
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>90</genitalAngle>
</li> </li>
<li> <li>
<tickDuration>7</tickDuration> <tickDuration>7</tickDuration>
@ -849,6 +855,7 @@
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>90</genitalAngle>
</li> </li>
</keyframes> </keyframes>
</li> </li>
@ -1968,8 +1975,6 @@
<li>Vaginal</li> <li>Vaginal</li>
</sexTypes> </sexTypes>
<actors> <actors>
<li> <li>
@ -1986,6 +1991,7 @@
<li>Human</li> <li>Human</li>
</defNames> </defNames>
<isFucking>true</isFucking> <isFucking>true</isFucking>
<controlGenitalAngle>true</controlGenitalAngle>
</li> </li>
</actors> </actors>
@ -2178,30 +2184,33 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>0</genitalAngle>
</li> </li>
<li> <li>
<tickDuration>33</tickDuration> <tickDuration>33</tickDuration>
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.213</bodyOffsetZ> <bodyOffsetZ>-0.313</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0.045</headBob> <headBob>0.045</headBob>
<genitalAngle>0</genitalAngle>
</li> </li>
<li> <li>
<tickDuration>1</tickDuration> <tickDuration>1</tickDuration>
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>0</genitalAngle>
</li> </li>
</keyframes> </keyframes>
</li> </li>
@ -2256,30 +2265,33 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>0</genitalAngle>
</li> </li>
<li> <li>
<tickDuration>13</tickDuration> <tickDuration>13</tickDuration>
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.213</bodyOffsetZ> <bodyOffsetZ>-0.313</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0.045</headBob> <headBob>0.045</headBob>
<genitalAngle>0</genitalAngle>
</li> </li>
<li> <li>
<tickDuration>1</tickDuration> <tickDuration>1</tickDuration>
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>0</genitalAngle>
</li> </li>
</keyframes> </keyframes>
</li> </li>
@ -2420,17 +2432,18 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>0</genitalAngle>
</li> </li>
<li> <li>
<tickDuration>10</tickDuration> <tickDuration>10</tickDuration>
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.213</bodyOffsetZ> <bodyOffsetZ>-0.313</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0.045</headBob> <headBob>0.045</headBob>
@ -2440,7 +2453,7 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
@ -2451,7 +2464,7 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
@ -2461,7 +2474,7 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.213</bodyOffsetZ> <bodyOffsetZ>-0.313</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0.045</headBob> <headBob>0.045</headBob>
@ -2471,7 +2484,7 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
@ -2482,7 +2495,7 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
@ -2492,7 +2505,7 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.213</bodyOffsetZ> <bodyOffsetZ>-0.313</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0.045</headBob> <headBob>0.045</headBob>
@ -2502,7 +2515,7 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
@ -2512,7 +2525,7 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
@ -2522,10 +2535,11 @@
<bodyAngle>180</bodyAngle> <bodyAngle>180</bodyAngle>
<headAngle>180</headAngle> <headAngle>180</headAngle>
<bodyOffsetX>0</bodyOffsetX> <bodyOffsetX>0</bodyOffsetX>
<bodyOffsetZ>-0.263</bodyOffsetZ> <bodyOffsetZ>-0.363</bodyOffsetZ>
<bodyFacing>2</bodyFacing> <bodyFacing>2</bodyFacing>
<headFacing>2</headFacing> <headFacing>2</headFacing>
<headBob>0</headBob> <headBob>0</headBob>
<genitalAngle>0</genitalAngle>
</li> </li>
</keyframes> </keyframes>
</li> </li>

View file

@ -88,10 +88,12 @@
<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" />
<Compile Include="Source\Patches\rjwPatches\HarmonyPatch_DoLovinAnimationPatch.cs" /> <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_DoLovinAnimationPatch.cs" />
<Compile Include="Source\Patches\rjwPatches\HarmonyPatch_DrawSemen.cs" />
<Compile Include="Source\Patches\rjwPatches\HarmonyPatch_JobDriver_SexBaseInitiator.cs" /> <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_JobDriver_SexBaseInitiator.cs" />
<Compile Include="Source\Patches\rjwPatches\HarmonyPatch_JoinInBedGiveJob.cs" /> <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_JoinInBedGiveJob.cs" />
<Compile Include="Source\Patches\rjwPatches\HarmonyPatch_SexTick.cs" /> <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_SexTick.cs" />

View file

@ -15,6 +15,7 @@ namespace Rimworld_Animations {
public string gender; public string gender;
public bool isFucking = false; public bool isFucking = false;
public bool isFucked = false; public bool isFucked = false;
public bool controlGenitalAngle = false;
public Vector3 offset = new Vector2(0, 0); public Vector3 offset = new Vector2(0, 0);
} }
} }

View file

@ -78,7 +78,7 @@ namespace Rimworld_Animations {
//TESTING ANIMATIONS ONLY REMEMBER TO COMMENT OUT BEFORE PUSH //TESTING ANIMATIONS ONLY REMEMBER TO COMMENT OUT BEFORE PUSH
/* /*
if (x.defName != "Test") if (x.defName != "Cowgirl")
return false; return false;
*/ */

View file

@ -14,6 +14,7 @@ namespace Rimworld_Animations {
public Dictionary<int, string> SoundEffects = new Dictionary<int, string>(); public Dictionary<int, string> SoundEffects = new Dictionary<int, string>();
public Dictionary<int, bool> quiver = new Dictionary<int, bool>(); public Dictionary<int, bool> quiver = new Dictionary<int, bool>();
public SimpleCurve GenitalAngle = new SimpleCurve();
public SimpleCurve BodyAngle = new SimpleCurve(); public SimpleCurve BodyAngle = new SimpleCurve();
public SimpleCurve HeadAngle = new SimpleCurve(); public SimpleCurve HeadAngle = new SimpleCurve();
public SimpleCurve HeadBob = new SimpleCurve(); public SimpleCurve HeadBob = new SimpleCurve();
@ -60,9 +61,14 @@ namespace Rimworld_Animations {
if (frame.headBob.HasValue) if (frame.headBob.HasValue)
HeadBob.Add((float)frame.atTick / (float)duration, frame.headBob.Value, true); HeadBob.Add((float)frame.atTick / (float)duration, frame.headBob.Value, true);
if (frame.genitalAngle.HasValue)
GenitalAngle.Add((float)frame.atTick / (float)duration, frame.genitalAngle.Value, true);
if (frame.soundEffect != null) { if (frame.soundEffect != null) {
SoundEffects.Add((int)frame.atTick, frame.soundEffect); SoundEffects.Add((int)frame.atTick, frame.soundEffect);
} }
} }
else { else {
if (frame.bodyAngle.HasValue) if (frame.bodyAngle.HasValue)
@ -86,6 +92,9 @@ namespace Rimworld_Animations {
if (frame.headBob.HasValue) if (frame.headBob.HasValue)
HeadBob.Add((float)keyframePosition / (float)duration, frame.headBob.Value, true); HeadBob.Add((float)keyframePosition / (float)duration, frame.headBob.Value, true);
if (frame.genitalAngle.HasValue)
GenitalAngle.Add((float)keyframePosition / (float)duration, frame.genitalAngle.Value, true);
if (frame.soundEffect != null) { if (frame.soundEffect != null) {
SoundEffects.Add(keyframePosition, frame.soundEffect); SoundEffects.Add(keyframePosition, frame.soundEffect);
} }

View file

@ -11,6 +11,8 @@ namespace Rimworld_Animations {
public float? bodyAngle; public float? bodyAngle;
public float? headAngle; public float? headAngle;
public float? genitalAngle;
public float? bodyOffsetZ; public float? bodyOffsetZ;
public float? bodyOffsetX; public float? bodyOffsetX;

View file

@ -43,9 +43,11 @@ namespace Rimworld_Animations {
private float clipPercent = 0; private float clipPercent = 0;
public Vector3 anchor, deltaPos, headBob; public Vector3 anchor, deltaPos, headBob;
public float bodyAngle, headAngle; public float bodyAngle, headAngle, genitalAngle;
public Rot4 headFacing, bodyFacing; public Rot4 headFacing, bodyFacing;
public bool controlGenitalAngle = false;
private AnimationDef anim; private AnimationDef anim;
private AnimationStage stage => anim.animationStages[curStage]; private AnimationStage stage => anim.animationStages[curStage];
private PawnAnimationClip clip => (PawnAnimationClip)stage.animationClips[actor]; private PawnAnimationClip clip => (PawnAnimationClip)stage.animationClips[actor];
@ -117,6 +119,8 @@ namespace Rimworld_Animations {
quiver = false; quiver = false;
this.shiver = shiver && AnimationSettings.rapeShiver; this.shiver = shiver && AnimationSettings.rapeShiver;
controlGenitalAngle = anim.actors[actor].controlGenitalAngle;
//tick once for initialization //tick once for initialization
tickAnim(); tickAnim();
@ -191,6 +195,17 @@ namespace Rimworld_Animations {
//play sound effect //play sound effect
if(rjw.RJWSettings.sounds_enabled && clip.SoundEffects.ContainsKey(clipTicks) && AnimationSettings.soundOverride) { if(rjw.RJWSettings.sounds_enabled && clip.SoundEffects.ContainsKey(clipTicks) && AnimationSettings.soundOverride) {
SoundDef.Named(clip.SoundEffects[clipTicks]).PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); SoundDef.Named(clip.SoundEffects[clipTicks]).PlayOneShot(new TargetInfo(pawn.Position, pawn.Map));
if (AnimationSettings.applySemenOnAnimationOrgasm && (pawn?.jobs?.curDriver is JobDriver_Sex) && clip.SoundEffects[clipTicks] == "Cum") {
Pawn partner = (pawn.jobs.curDriver as JobDriver_Sex)?.Partner;
if(anim.sexTypes.Contains((pawn.jobs.curDriver as JobDriver_Sex).sexType)) {
SemenHelper.calculateAndApplySemen(pawn, partner, (pawn.jobs.curDriver as JobDriver_Sex).sexType);
}
}
} }
if(AnimationSettings.orgasmQuiver && clip.quiver.ContainsKey(clipTicks)) { if(AnimationSettings.orgasmQuiver && clip.quiver.ContainsKey(clipTicks)) {
quiver = clip.quiver[clipTicks]; quiver = clip.quiver[clipTicks];
@ -218,6 +233,11 @@ namespace Rimworld_Animations {
if (headAngle < 0) headAngle = 360 - ((-1f * headAngle) % 360); if (headAngle < 0) headAngle = 360 - ((-1f * headAngle) % 360);
if (headAngle > 360) headAngle %= 360; if (headAngle > 360) headAngle %= 360;
if (controlGenitalAngle) {
genitalAngle = clip.GenitalAngle.Evaluate(clipPercent) * (mirror ? -1 : 1);
if (genitalAngle < 0) genitalAngle = 360 - ((-1f * genitalAngle) % 360);
if (genitalAngle > 360) genitalAngle %= 360;
}
bodyFacing = mirror ? new Rot4((int)clip.BodyFacing.Evaluate(clipPercent)).Opposite : new Rot4((int)clip.BodyFacing.Evaluate(clipPercent)); bodyFacing = mirror ? new Rot4((int)clip.BodyFacing.Evaluate(clipPercent)).Opposite : new Rot4((int)clip.BodyFacing.Evaluate(clipPercent));
@ -231,6 +251,7 @@ namespace Rimworld_Animations {
headFacing = headFacing.Opposite; headFacing = headFacing.Opposite;
} }
headBob = new Vector3(0, 0, clip.HeadBob.Evaluate(clipPercent)); headBob = new Vector3(0, 0, clip.HeadBob.Evaluate(clipPercent));
} }
public Vector3 getPawnHeadPosition() { public Vector3 getPawnHeadPosition() {

View file

@ -126,10 +126,16 @@ namespace Rimworld_Animations {
quat: Quaternion.AngleAxis(angle: num, axis: Vector3.up) * headQuatInAnimation, mat: alienComp.addonGraphics[index: i].MatAt(rot: pawnAnimator.headFacing), drawNow: portrait); quat: Quaternion.AngleAxis(angle: num, axis: Vector3.up) * headQuatInAnimation, mat: alienComp.addonGraphics[index: i].MatAt(rot: pawnAnimator.headFacing), drawNow: portrait);
} }
else { else {
Quaternion addonRotation = quat;
if (AnimationSettings.controlGenitalRotation && pawnAnimator.controlGenitalAngle && ba.hediffGraphics[0] != null && (ba.hediffGraphics[0].path.Contains("Penis") || ba.hediffGraphics[0].path.Contains("penis"))) {
addonRotation = Quaternion.AngleAxis(angle: pawnAnimator.genitalAngle, axis: Vector3.up);
}
GenDraw.DrawMeshNowOrLater(mesh: alienComp.addonGraphics[index: i].MeshAt(rot: rotation), loc: vector + offsetVector.RotatedBy(angle: Mathf.Acos(f: Quaternion.Dot(a: Quaternion.identity, b: quat)) * 2f * 57.29578f), GenDraw.DrawMeshNowOrLater(mesh: alienComp.addonGraphics[index: i].MeshAt(rot: rotation), loc: vector + offsetVector.RotatedBy(angle: Mathf.Acos(f: Quaternion.Dot(a: Quaternion.identity, b: quat)) * 2f * 57.29578f),
quat: Quaternion.AngleAxis(angle: num, axis: Vector3.up) * quat, mat: alienComp.addonGraphics[index: i].MatAt(rot: rotation), drawNow: portrait); quat: Quaternion.AngleAxis(angle: num, axis: Vector3.up) * addonRotation, mat: alienComp.addonGraphics[index: i].MatAt(rot: rotation), drawNow: portrait);
} }

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;
}
}
}

View file

@ -0,0 +1,22 @@
/*
* Todo: Ask to make SemenSplatch and DrawSemen public
*
*
* using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using rjw;
using HarmonyLib;
namespace Rimworld_Animations {
[HarmonyPatch("DrawSemen")]
public static class HarmonyPatch_DrawSemen {
public static void Prefix(ref Dictionary<string, SemenSplatch>) {
}
}
}*/

View file

@ -9,16 +9,18 @@ using UnityEngine;
namespace Rimworld_Animations { namespace Rimworld_Animations {
public class AnimationSettings : ModSettings { public class AnimationSettings : ModSettings {
public static bool orgasmQuiver, rapeShiver, soundOverride = true, hearts = true; public static bool orgasmQuiver, rapeShiver, soundOverride = true, hearts = true, controlGenitalRotation = false, applySemenOnAnimationOrgasm = false;
public static float shiverIntensity = 2f; public static float shiverIntensity = 2f;
public override void ExposeData() { public override void ExposeData() {
base.ExposeData(); base.ExposeData();
Scribe_Values.Look(ref controlGenitalRotation, "controlGenitalRotation", false);
Scribe_Values.Look(ref orgasmQuiver, "orgasmQuiver"); Scribe_Values.Look(ref orgasmQuiver, "orgasmQuiver");
Scribe_Values.Look(ref rapeShiver, "rapeShiver"); Scribe_Values.Look(ref rapeShiver, "rapeShiver");
Scribe_Values.Look(ref hearts, "heartsOnLovin"); Scribe_Values.Look(ref hearts, "heartsOnLovin");
Scribe_Values.Look(ref applySemenOnAnimationOrgasm, "applySemenOnOrgasm", false);
Scribe_Values.Look(ref soundOverride, "rjwAnimSoundOverride", true); Scribe_Values.Look(ref soundOverride, "rjwAnimSoundOverride", true);
Scribe_Values.Look(ref shiverIntensity, "shiverIntensity", 2f); Scribe_Values.Look(ref shiverIntensity, "shiverIntensity", 2f);
@ -39,6 +41,8 @@ namespace Rimworld_Animations {
listingStandard.Begin(inRect); listingStandard.Begin(inRect);
listingStandard.CheckboxLabeled("Enable Sound Override", ref AnimationSettings.soundOverride); listingStandard.CheckboxLabeled("Enable Sound Override", ref AnimationSettings.soundOverride);
listingStandard.CheckboxLabeled("Control Genital Rotation", ref AnimationSettings.controlGenitalRotation);
listingStandard.CheckboxLabeled("Apply semen on animation orgasm", ref AnimationSettings.applySemenOnAnimationOrgasm);
listingStandard.CheckboxLabeled("Enable Orgasm Quiver", ref AnimationSettings.orgasmQuiver); listingStandard.CheckboxLabeled("Enable Orgasm Quiver", ref AnimationSettings.orgasmQuiver);
listingStandard.CheckboxLabeled("Enable Rape Shiver", ref AnimationSettings.rapeShiver); listingStandard.CheckboxLabeled("Enable Rape Shiver", ref AnimationSettings.rapeShiver);
listingStandard.CheckboxLabeled("Enable hearts during lovin'", ref AnimationSettings.hearts); listingStandard.CheckboxLabeled("Enable hearts during lovin'", ref AnimationSettings.hearts);