Rape shiver

This commit is contained in:
Platinum 2020-04-20 21:59:09 -07:00
parent 9d70c2cb59
commit 72b1201559
5 changed files with 16 additions and 7 deletions

View File

@ -96,7 +96,7 @@
<Compile Include="Source\Patches\rjwPatches\HarmonyPatch_JoinInBedGiveJob.cs" />
<Compile Include="Source\Patches\rjwPatches\HarmonyPatch_SexTick.cs" />
<Compile Include="Source\Patches\rjwPatches\HarmonyPatch_WorkGiverSex.cs" />
<Compile Include="Source\Settings\Animation_Settings.cs" />
<Compile Include="Source\Settings\AnimationSettings.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -35,7 +35,7 @@ namespace Rimworld_Animations {
}
}
private bool Animating;
private bool mirror = false, quiver = false;
private bool mirror = false, quiver = false, shiver = false;
private int actor;
private int animTicks = 0, stageTicks = 0, clipTicks = 0;
@ -92,7 +92,7 @@ namespace Rimworld_Animations {
anchor = thing.Position.ToVector3Shifted();
}
}
public void StartAnimation(AnimationDef anim, int actor, bool mirror = false) {
public void StartAnimation(AnimationDef anim, int actor, bool mirror = false, bool shiver = false) {
isAnimating = true;
@ -115,6 +115,7 @@ namespace Rimworld_Animations {
clipTicks = 0;
quiver = false;
this.shiver = shiver && AnimationSettings.rapeShiver;
//tick once for initialization
tickAnim();
@ -202,7 +203,7 @@ namespace Rimworld_Animations {
public void calculateDrawValues() {
deltaPos = new Vector3(clip.BodyOffsetX.Evaluate(clipPercent) * (mirror ? -1 : 1), clip.layer.AltitudeFor(), clip.BodyOffsetZ.Evaluate(clipPercent));
bodyAngle = (clip.BodyAngle.Evaluate(clipPercent) + (quiver ? (Rand.Value * 2f) - 1f : 0f)) * (mirror ? -1 : 1);
bodyAngle = (clip.BodyAngle.Evaluate(clipPercent) + (quiver || shiver ? ((Rand.Value * AnimationSettings.shiverIntensity) - (AnimationSettings.shiverIntensity / 2f)) : 0f)) * (mirror ? -1 : 1);
headAngle = clip.HeadAngle.Evaluate(clipPercent) * (mirror ? -1 : 1);
bodyFacing = mirror ? new Rot4((int)clip.BodyFacing.Evaluate(clipPercent)).Opposite : new Rot4((int)clip.BodyFacing.Evaluate(clipPercent));

View File

@ -94,9 +94,9 @@ namespace Rimworld_Animations {
pawnsToAnimate[i].TryGetComp<CompBodyAnimator>().setAnchor(pos);
}
pawnsToAnimate[i].TryGetComp<CompBodyAnimator>().StartAnimation(anim, i, mirror);
bool shiver = pawnsToAnimate[i].jobs.curDriver is JobDriver_SexBaseRecieverRaped;
pawnsToAnimate[i].TryGetComp<CompBodyAnimator>().StartAnimation(anim, i, mirror, shiver);
(pawnsToAnimate[i].jobs.curDriver as JobDriver_Sex).ticks_left = anim.animationTimeTicks;
(pawnsToAnimate[i].jobs.curDriver as JobDriver_Sex).ticksLeftThisToil = anim.animationTimeTicks;
(pawnsToAnimate[i].jobs.curDriver as JobDriver_Sex).duration = anim.animationTimeTicks;

View File

@ -9,10 +9,13 @@ using UnityEngine;
namespace Rimworld_Animations {
public class AnimationSettings : ModSettings {
public static bool orgasmQuiver;
public static bool orgasmQuiver, rapeShiver;
public static float shiverIntensity = 2f;
public override void ExposeData() {
Scribe_Values.Look(ref orgasmQuiver, "orgasmQuiver");
Scribe_Values.Look(ref rapeShiver, "rapeShiver");
Scribe_Values.Look(ref shiverIntensity, "shiverIntensity", 2f);
base.ExposeData();
}
@ -29,6 +32,11 @@ namespace Rimworld_Animations {
listingStandard.Begin(inRect);
listingStandard.CheckboxLabeled("Enable Orgasm Quiver", ref AnimationSettings.orgasmQuiver);
listingStandard.CheckboxLabeled("Enable Rape Shiver", ref AnimationSettings.rapeShiver);
listingStandard.Label("Shiver/Quiver Intensity (default 2): " + AnimationSettings.shiverIntensity);
AnimationSettings.shiverIntensity = listingStandard.Slider(AnimationSettings.shiverIntensity, 0.0f, 12f);
listingStandard.End();
base.DoSettingsWindowContents(inRect);
}