mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
genital rotation, requires special ver. of RimNudeWorld. Enable in options
This commit is contained in:
parent
89d93091b0
commit
1707afaa4d
9 changed files with 69 additions and 25 deletions
|
@ -15,6 +15,7 @@ namespace Rimworld_Animations {
|
|||
public string gender;
|
||||
public bool isFucking = false;
|
||||
public bool isFucked = false;
|
||||
public bool controlGenitalAngle = false;
|
||||
public Vector3 offset = new Vector2(0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,10 +77,10 @@ namespace Rimworld_Animations {
|
|||
}
|
||||
|
||||
//TESTING ANIMATIONS ONLY REMEMBER TO COMMENT OUT BEFORE PUSH
|
||||
/*
|
||||
if (x.defName != "Test")
|
||||
|
||||
if (x.defName != "Cowgirl")
|
||||
return false;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
if (x.actors[i].isFucking && !rjw.xxx.can_fuck(localParticipants[i])) {
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace Rimworld_Animations {
|
|||
|
||||
public Dictionary<int, string> SoundEffects = new Dictionary<int, string>();
|
||||
public Dictionary<int, bool> quiver = new Dictionary<int, bool>();
|
||||
public SimpleCurve GenitalAngle = new SimpleCurve();
|
||||
public SimpleCurve BodyAngle = new SimpleCurve();
|
||||
public SimpleCurve HeadAngle = new SimpleCurve();
|
||||
public SimpleCurve HeadBob = new SimpleCurve();
|
||||
|
@ -60,9 +61,14 @@ namespace Rimworld_Animations {
|
|||
if (frame.headBob.HasValue)
|
||||
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) {
|
||||
SoundEffects.Add((int)frame.atTick, frame.soundEffect);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
if (frame.bodyAngle.HasValue)
|
||||
|
@ -86,6 +92,9 @@ namespace Rimworld_Animations {
|
|||
if (frame.headBob.HasValue)
|
||||
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) {
|
||||
SoundEffects.Add(keyframePosition, frame.soundEffect);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,8 @@ namespace Rimworld_Animations {
|
|||
public float? bodyAngle;
|
||||
public float? headAngle;
|
||||
|
||||
public float? genitalAngle;
|
||||
|
||||
public float? bodyOffsetZ;
|
||||
public float? bodyOffsetX;
|
||||
|
||||
|
|
|
@ -43,9 +43,11 @@ namespace Rimworld_Animations {
|
|||
private float clipPercent = 0;
|
||||
|
||||
public Vector3 anchor, deltaPos, headBob;
|
||||
public float bodyAngle, headAngle;
|
||||
public float bodyAngle, headAngle, genitalAngle;
|
||||
public Rot4 headFacing, bodyFacing;
|
||||
|
||||
public bool controlGenitalAngle = false;
|
||||
|
||||
private AnimationDef anim;
|
||||
private AnimationStage stage => anim.animationStages[curStage];
|
||||
private PawnAnimationClip clip => (PawnAnimationClip)stage.animationClips[actor];
|
||||
|
@ -117,6 +119,8 @@ namespace Rimworld_Animations {
|
|||
quiver = false;
|
||||
this.shiver = shiver && AnimationSettings.rapeShiver;
|
||||
|
||||
controlGenitalAngle = anim.actors[actor].controlGenitalAngle;
|
||||
|
||||
//tick once for initialization
|
||||
tickAnim();
|
||||
|
||||
|
@ -218,6 +222,11 @@ namespace Rimworld_Animations {
|
|||
if (headAngle < 0) headAngle = 360 - ((-1f * 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));
|
||||
|
||||
|
@ -231,6 +240,7 @@ namespace Rimworld_Animations {
|
|||
headFacing = headFacing.Opposite;
|
||||
}
|
||||
headBob = new Vector3(0, 0, clip.HeadBob.Evaluate(clipPercent));
|
||||
|
||||
}
|
||||
|
||||
public Vector3 getPawnHeadPosition() {
|
||||
|
|
|
@ -125,10 +125,16 @@ namespace Rimworld_Animations {
|
|||
quat: Quaternion.AngleAxis(angle: num, axis: Vector3.up) * headQuatInAnimation, mat: alienComp.addonGraphics[index: i].MatAt(rot: pawnAnimator.headFacing), drawNow: portrait);
|
||||
|
||||
}
|
||||
|
||||
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),
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,14 @@ using UnityEngine;
|
|||
namespace Rimworld_Animations {
|
||||
public class AnimationSettings : ModSettings {
|
||||
|
||||
public static bool orgasmQuiver, rapeShiver, soundOverride = true, hearts = true;
|
||||
public static bool orgasmQuiver, rapeShiver, soundOverride = true, hearts = true, controlGenitalRotation = false;
|
||||
public static float shiverIntensity = 2f;
|
||||
|
||||
public override void ExposeData() {
|
||||
|
||||
base.ExposeData();
|
||||
|
||||
Scribe_Values.Look(ref controlGenitalRotation, "controlGenitalRotation", false);
|
||||
Scribe_Values.Look(ref orgasmQuiver, "orgasmQuiver");
|
||||
Scribe_Values.Look(ref rapeShiver, "rapeShiver");
|
||||
Scribe_Values.Look(ref hearts, "heartsOnLovin");
|
||||
|
@ -39,6 +40,7 @@ namespace Rimworld_Animations {
|
|||
listingStandard.Begin(inRect);
|
||||
|
||||
listingStandard.CheckboxLabeled("Enable Sound Override", ref AnimationSettings.soundOverride);
|
||||
listingStandard.CheckboxLabeled("Control Genital Rotation", ref AnimationSettings.controlGenitalRotation);
|
||||
listingStandard.CheckboxLabeled("Enable Orgasm Quiver", ref AnimationSettings.orgasmQuiver);
|
||||
listingStandard.CheckboxLabeled("Enable Rape Shiver", ref AnimationSettings.rapeShiver);
|
||||
listingStandard.CheckboxLabeled("Enable hearts during lovin'", ref AnimationSettings.hearts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue