mirror of
				https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
				synced 2024-08-15 00:43:45 +00:00 
			
		
		
		
	Rape shiver
This commit is contained in:
		
							parent
							
								
									9d70c2cb59
								
							
						
					
					
						commit
						72b1201559
					
				
					 5 changed files with 16 additions and 7 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -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" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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));
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
        }
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue