From 8a7b542d173e47d24ac3ed6084a17954c834e18d Mon Sep 17 00:00:00 2001 From: AbstractConcept Date: Wed, 7 Sep 2022 09:12:17 -0500 Subject: [PATCH] Patch --- 1.3/Source/Actors/Actor.cs | 2 +- 1.3/Source/Animations/AnimationStage.cs | 3 ++- 1.3/Source/Animations/Clips/BaseAnimationClip.cs | 2 +- 1.3/Source/Animations/Keyframes/Keyframe.cs | 1 + 1.3/Source/Comps/CompBodyAnimator.cs | 7 +++++-- 1.3/Source/Comps/CompProperties_BodyAnimator.cs | 3 +-- 1.3/Source/Defs/AnimationDef.cs | 1 + 1.3/Source/Extensions/.gitkeep | 0 .../RimworldPatches/HarmonyPatch_SetPawnAnimatable.cs | 1 - Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj | 4 ++-- Rimworld-Animations.csproj | 7 ++++++- 11 files changed, 20 insertions(+), 11 deletions(-) delete mode 100644 1.3/Source/Extensions/.gitkeep diff --git a/1.3/Source/Actors/Actor.cs b/1.3/Source/Actors/Actor.cs index 34766e0..3b382dd 100644 --- a/1.3/Source/Actors/Actor.cs +++ b/1.3/Source/Actors/Actor.cs @@ -21,6 +21,6 @@ namespace Rimworld_Animations { public BodyTypeOffset bodyTypeOffset = new BodyTypeOffset(); public Vector3 offset = new Vector2(0, 0); public List requiredGender; - + public List tags = new List(); } } diff --git a/1.3/Source/Animations/AnimationStage.cs b/1.3/Source/Animations/AnimationStage.cs index 475c079..7a1304e 100644 --- a/1.3/Source/Animations/AnimationStage.cs +++ b/1.3/Source/Animations/AnimationStage.cs @@ -10,9 +10,10 @@ namespace Rimworld_Animations { public string stageName; public int stageIndex; public int playTimeTicks = 0; + public int playTimeTicksQuick = -1; public bool isLooping; public List animationClips; - + public List tags = new List(); public void initialize() { foreach (BaseAnimationClip clip in animationClips) { diff --git a/1.3/Source/Animations/Clips/BaseAnimationClip.cs b/1.3/Source/Animations/Clips/BaseAnimationClip.cs index 9963cd5..aa35b31 100644 --- a/1.3/Source/Animations/Clips/BaseAnimationClip.cs +++ b/1.3/Source/Animations/Clips/BaseAnimationClip.cs @@ -15,6 +15,6 @@ namespace Rimworld_Animations { public abstract void buildSimpleCurves(); public string soundDef = null; //for playing sounds public int actor; - + public List tags = new List(); } } diff --git a/1.3/Source/Animations/Keyframes/Keyframe.cs b/1.3/Source/Animations/Keyframes/Keyframe.cs index b34eb44..8cd859d 100644 --- a/1.3/Source/Animations/Keyframes/Keyframe.cs +++ b/1.3/Source/Animations/Keyframes/Keyframe.cs @@ -10,5 +10,6 @@ namespace Rimworld_Animations { public int tickDuration = 1; public float? atTick; public string soundEffect; + public List tags = new List(); } } diff --git a/1.3/Source/Comps/CompBodyAnimator.cs b/1.3/Source/Comps/CompBodyAnimator.cs index e0ac52a..7910f7d 100644 --- a/1.3/Source/Comps/CompBodyAnimator.cs +++ b/1.3/Source/Comps/CompBodyAnimator.cs @@ -52,6 +52,7 @@ namespace Rimworld_Animations { public List actorsInCurrentAnimation; public bool controlGenitalAngle = false; + public bool fastAnimForQuickie = false; private AnimationDef anim; private AnimationStage stage { @@ -155,7 +156,9 @@ namespace Rimworld_Animations { this.actor = actor; this.anim = anim; this.mirror = mirror; - if(fastAnimForQuickie) + this.fastAnimForQuickie = fastAnimForQuickie; + + if (fastAnimForQuickie && anim.animationStages.Any(x => x.playTimeTicksQuick >= 0) == false) { curStage = 1; animTicks = anim.animationStages[0].playTimeTicks; @@ -259,7 +262,7 @@ namespace Rimworld_Animations { stageTicks++; - if(stageTicks >= stage.playTimeTicks) { + if(stageTicks >= stage.playTimeTicks || (fastAnimForQuickie && stage.playTimeTicksQuick >= 0 && stageTicks >= stage.playTimeTicksQuick)) { curStage++; diff --git a/1.3/Source/Comps/CompProperties_BodyAnimator.cs b/1.3/Source/Comps/CompProperties_BodyAnimator.cs index bfcde83..09df7ce 100644 --- a/1.3/Source/Comps/CompProperties_BodyAnimator.cs +++ b/1.3/Source/Comps/CompProperties_BodyAnimator.cs @@ -1,4 +1,4 @@ - using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -11,7 +11,6 @@ namespace Rimworld_Animations { { public CompProperties_BodyAnimator() { - base.compClass = typeof(CompBodyAnimator); } } diff --git a/1.3/Source/Defs/AnimationDef.cs b/1.3/Source/Defs/AnimationDef.cs index d0d9d61..395ff83 100644 --- a/1.3/Source/Defs/AnimationDef.cs +++ b/1.3/Source/Defs/AnimationDef.cs @@ -15,6 +15,7 @@ namespace Rimworld_Animations { public bool sounds = false; public List sexTypes = null; public List interactionDefTypes = null; + public List tags = new List(); public override void PostLoad() { base.PostLoad(); diff --git a/1.3/Source/Extensions/.gitkeep b/1.3/Source/Extensions/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/1.3/Source/Patches/RimworldPatches/HarmonyPatch_SetPawnAnimatable.cs b/1.3/Source/Patches/RimworldPatches/HarmonyPatch_SetPawnAnimatable.cs index fbaf045..b8c66b8 100644 --- a/1.3/Source/Patches/RimworldPatches/HarmonyPatch_SetPawnAnimatable.cs +++ b/1.3/Source/Patches/RimworldPatches/HarmonyPatch_SetPawnAnimatable.cs @@ -27,7 +27,6 @@ namespace Rimworld_Animations { if (i.OperandIs(AccessTools.Method(typeof(PawnUtility), "IsInvisible"))) { - yield return new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(PawnRenderer_RenderPawnAt_Patch), "ClearCache")); } else diff --git a/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj b/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj index fc6cbf9..b25b5c2 100644 --- a/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj +++ b/Patch_SexToysMasturbation/Patch_SexToysMasturbation.csproj @@ -46,11 +46,11 @@ False - ..\..\rjw\1.3\Assemblies\RJW.dll + ..\..\rjw-master\1.3\Assemblies\RJW.dll False - ..\..\rjw-toys-and-masturbation\Assemblies\RJW-ToysAndMasturbation.dll + ..\..\rjw-toys-and-masturbation-master\Assemblies\RJW-ToysAndMasturbation.dll False diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj index 1c066ce..674eb10 100644 --- a/Rimworld-Animations.csproj +++ b/Rimworld-Animations.csproj @@ -44,7 +44,11 @@ False - ..\rjw\1.3\Assemblies\RJW.dll + ..\rjw-master\1.3\Assemblies\RJW.dll + False + + + ..\rjw-toys-and-masturbation-master\Assemblies\RJW-ToysAndMasturbation.dll False @@ -65,6 +69,7 @@ +