diff --git a/1.5/Assemblies/Rimworld-Animations.dll b/1.5/Assemblies/Rimworld-Animations.dll
index 9ecd083..1870329 100644
Binary files a/1.5/Assemblies/Rimworld-Animations.dll and b/1.5/Assemblies/Rimworld-Animations.dll differ
diff --git a/1.5/Defs/AnimationDefs/TestAnimation1.xml b/1.5/Defs/AnimationDefs/TestAnimation1.xml
index 466bbb4..caee678 100644
--- a/1.5/Defs/AnimationDefs/TestAnimation1.xml
+++ b/1.5/Defs/AnimationDefs/TestAnimation1.xml
@@ -98,8 +98,9 @@
+
- RenderNodeTag_Xray_Inside
+ RenderNodeTag_Banana
Rimworld_Animations.AnimationWorker_KeyframesExtended
diff --git a/1.5/Defs/AnimationPropDefs/AnimationPropDef.xml b/1.5/Defs/AnimationPropDefs/AnimationPropDef.xml
new file mode 100644
index 0000000..7815092
--- /dev/null
+++ b/1.5/Defs/AnimationPropDefs/AnimationPropDef.xml
@@ -0,0 +1,52 @@
+
+
+
+
+ RenderNodeTag_Banana
+
+
+
+ AnimationProp_Banana
+
+
+
+
+ AnimProp_Banana
+ Rimworld_Animations.PawnRenderNode_GraphicVariants
+ Rimworld_Animations.PawnRenderNodeWorker_GraphicVariants
+
+ RenderNodeTag_Banana
+ Body
+ AnimationProps/Banana/Banana
+
+ Head
+ 95
+
+
+ AnimationProps/Cat/Cat1
+ AnimationProps/Cat/Cat2
+
+
+ True
+
+
+
+
+
+ RenderNodeTag_Genitals
+
+
+
+ AnimationProp_Genitals
+
+
+ AnimProp_Genitals
+ false
+ RenderNodeTag_Genitals
+ Body
+
+ Head
+ 95
+
+
+
diff --git a/1.5/Defs/AnimationPropDefs/AnimationPropDef_Banana.xml b/1.5/Defs/AnimationPropDefs/AnimationPropDef_Banana.xml
deleted file mode 100644
index fc1e606..0000000
--- a/1.5/Defs/AnimationPropDefs/AnimationPropDef_Banana.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- RenderNodeTag_Banana
-
-
-
- AnimationProp_Banana
-
- Banana
- RenderNodeTag_Banana
- Body
- AnimationProps/Banana/Banana
- Head
- 95
-
-
-
diff --git a/1.5/Defs/AnimationPropDefs/AnimationPropDef_Xray_Inside.xml b/1.5/Defs/AnimationPropDefs/AnimationPropDef_Xray_Inside.xml
deleted file mode 100644
index c758775..0000000
--- a/1.5/Defs/AnimationPropDefs/AnimationPropDef_Xray_Inside.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- RenderNodeTag_Xray_Inside
-
-
-
- AnimationProp_Xray_Inside
-
- Xray Inside
- Rimworld_Animations.PawnRenderNode_GraphicVariants
- Rimworld_Animations.PawnRenderNodeWorker_GraphicVariants
- RenderNodeTag_Xray_Inside
- True
- Body
-
- Head
- 95
- TexPathVariants_Xray_Inside
-
-
-
-
diff --git a/1.5/Defs/AnimationPropDefs/AnimationPropDef_Xray_Penis.xml b/1.5/Defs/AnimationPropDefs/AnimationPropDef_Xray_Penis.xml
deleted file mode 100644
index e0a97c2..0000000
--- a/1.5/Defs/AnimationPropDefs/AnimationPropDef_Xray_Penis.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
- RenderNodeTag_Xray_Penis
-
-
- AnimationProp_Penis
-
- Xray Penis
- Rimworld_Animations.PawnRenderNode_GraphicHediffVariants
- Rimworld_Animations.PawnRenderNodeWorker_GraphicHediffVariants
- RenderNodeTag_Xray_Penis
- Body
- AnimationProps/Banana/Banana
-
- Head
- 95
- True
-
-
- TexPathVariants_XrayPenis_Human
-
-
-
-
-
- HorsePenis
- RaccoonPenis
-
- TexPathVariants_XrayPenis_Horse
-
-
-
-
-
\ No newline at end of file
diff --git a/1.5/Defs/GroupAnimationDefs/TestGroupAnimation1.xml b/1.5/Defs/GroupAnimationDefs/TestGroupAnimation1.xml
index 1f68f3d..6be826f 100644
--- a/1.5/Defs/GroupAnimationDefs/TestGroupAnimation1.xml
+++ b/1.5/Defs/GroupAnimationDefs/TestGroupAnimation1.xml
@@ -3,7 +3,6 @@
TestGroupAnimation1
2
- True
10
diff --git a/1.5/Defs/TexPathVariantsDefs/TexPathVariants_Cat.xml b/1.5/Defs/TexPathVariantsDefs/TexPathVariants_Cat.xml
deleted file mode 100644
index 474aca4..0000000
--- a/1.5/Defs/TexPathVariantsDefs/TexPathVariants_Cat.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- TexPathVariants_Cat
-
- AnimationProps/Cat/Cat1
- AnimationProps/Cat/Cat2
-
-
-
-
\ No newline at end of file
diff --git a/1.5/Defs/TexPathVariantsDefs/TexPathVariants_XrayPenis_Horse.xml b/1.5/Defs/TexPathVariantsDefs/TexPathVariants_XrayPenis_Horse.xml
deleted file mode 100644
index 3b14154..0000000
--- a/1.5/Defs/TexPathVariantsDefs/TexPathVariants_XrayPenis_Horse.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- TexPathVariants_XrayPenis_Horse
-
- AnimationProps/Cat/Cat1
-
- AnimationProps/Cat/Cat2
-
-
-
-
-
\ No newline at end of file
diff --git a/1.5/Defs/TexPathVariantsDefs/TexPathVariants_XrayPenis_Human.xml b/1.5/Defs/TexPathVariantsDefs/TexPathVariants_XrayPenis_Human.xml
deleted file mode 100644
index 235ee3e..0000000
--- a/1.5/Defs/TexPathVariantsDefs/TexPathVariants_XrayPenis_Human.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- TexPathVariants_XrayPenis_Human
-
- AnimationProps/Cat/Cat1
-
- AnimationProps/Cat/Cat2
-
-
-
-
-
\ No newline at end of file
diff --git a/1.5/Defs/TexPathVariantsDefs/TexPathVariants_Xray_Inside.xml b/1.5/Defs/TexPathVariantsDefs/TexPathVariants_Xray_Inside.xml
deleted file mode 100644
index 4c9f90b..0000000
--- a/1.5/Defs/TexPathVariantsDefs/TexPathVariants_Xray_Inside.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- TexPathVariants_Xray_Inside
-
- AnimationProps/Cat/Cat1
-
- AnimationProps/Cat/Cat2
-
-
-
-
-
\ No newline at end of file
diff --git a/1.5/Source/Animations/GroupAnimations/GroupAnimationDef.cs b/1.5/Source/Animations/GroupAnimations/GroupAnimationDef.cs
index c9cc5e0..55f3bea 100644
--- a/1.5/Source/Animations/GroupAnimations/GroupAnimationDef.cs
+++ b/1.5/Source/Animations/GroupAnimations/GroupAnimationDef.cs
@@ -55,7 +55,6 @@ namespace Rimworld_Animations
{
//element at or default to stop errors
if (offsetDefs == null) return null;
- if ((actor + reorder) % numActors >= offsetDefs.Count) return null;
return offsetDefs[(actor + reorder) % numActors].FindOffset(pawn);
}
}
diff --git a/1.5/Source/Comps/CompExtendedAnimator.cs b/1.5/Source/Comps/CompExtendedAnimator.cs
index 463dd3f..a85a5fc 100644
--- a/1.5/Source/Comps/CompExtendedAnimator.cs
+++ b/1.5/Source/Comps/CompExtendedAnimator.cs
@@ -51,23 +51,6 @@ namespace Rimworld_Animations {
}
}
- public int AnimationLength
- {
- get
- {
- if (!IsAnimating) return 0;
-
- int groupAnimLength = 0;
- foreach(AnimationDef anim in animationQueue)
- {
- groupAnimLength += anim.durationTicks;
- }
-
- return groupAnimLength;
-
- }
- }
-
public Vector3 getAnchor()
{
return anchor.getDrawPos();
@@ -170,10 +153,6 @@ namespace Rimworld_Animations {
{
PawnRenderNodeProperties props = animationProp.animPropProperties;
- if (props.texPath.NullOrEmpty())
- {
- props.texPath = "AnimationProps/Banana/Banana";
- }
//create new render node
PawnRenderNode animRenderNode = (PawnRenderNode)Activator.CreateInstance(props.nodeClass, new object[] {
diff --git a/1.5/Source/Patches/RJWPatches/JobDrivers/JobDriver_Sex/HarmonyPatch_PlaySexSounds.cs b/1.5/Source/Patches/RJWPatches/HarmonyPatch_PlaySexSounds.cs
similarity index 100%
rename from 1.5/Source/Patches/RJWPatches/JobDrivers/JobDriver_Sex/HarmonyPatch_PlaySexSounds.cs
rename to 1.5/Source/Patches/RJWPatches/HarmonyPatch_PlaySexSounds.cs
diff --git a/1.5/Source/Patches/RJWPatches/JobDrivers/JobDriver_Sex/HarmonyPatch_SexTick.cs b/1.5/Source/Patches/RJWPatches/HarmonyPatch_SexTick.cs
similarity index 100%
rename from 1.5/Source/Patches/RJWPatches/JobDrivers/JobDriver_Sex/HarmonyPatch_SexTick.cs
rename to 1.5/Source/Patches/RJWPatches/HarmonyPatch_SexTick.cs
diff --git a/1.5/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseInitiator.cs b/1.5/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseInitiator.cs
index 07f286f..8980cec 100644
--- a/1.5/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseInitiator.cs
+++ b/1.5/Source/Patches/RJWPatches/JobDrivers/HarmonyPatch_JobDriver_SexBaseInitiator.cs
@@ -37,7 +37,7 @@ namespace Rimworld_Animations {
bool quickie = (__instance is JobDriver_SexQuick) && AnimationSettings.fastAnimForQuickie;
int preAnimDuration = __instance.duration;
-
+ int AnimationTimeTicks = 0;
List participants = partnerSexBaseReceiver.parteners.Append(partner).ToList();
@@ -45,16 +45,16 @@ namespace Rimworld_Animations {
if (groupAnimation != null)
{
AnimationUtility.StartGroupAnimation(participants, groupAnimation, reorder, partner);
- int animTicks = AnimationUtility.GetAnimationLength(pawn);
-
- foreach(Pawn participant in participants)
- {
- (participant.jobs.curDriver as JobDriver_Sex).ticks_left = animTicks;
- (participant.jobs.curDriver as JobDriver_Sex).sex_ticks = animTicks;
- (participant.jobs.curDriver as JobDriver_Sex).orgasmStartTick = animTicks;
- (participant.jobs.curDriver as JobDriver_Sex).duration = animTicks;
- }
}
+
+
+ //Modify Orgasm ticks to only orgasm as many times as RJW stock orgasm allows
+ if (AnimationTimeTicks != 0)
+ {
+ __instance.orgasmstick = preAnimDuration * __instance.orgasmstick / AnimationTimeTicks;
+ }
+
+
}
}
diff --git a/1.5/Source/Patches/RJWPatches/JobDrivers/JobDriver_Sex/HarmonyPatch_Animate.cs b/1.5/Source/Patches/RJWPatches/JobDrivers/JobDriver_Sex/HarmonyPatch_Animate.cs
deleted file mode 100644
index eaaf9b1..0000000
--- a/1.5/Source/Patches/RJWPatches/JobDrivers/JobDriver_Sex/HarmonyPatch_Animate.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using HarmonyLib;
-using rjw;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Verse;
-
-namespace Rimworld_Animations
-{
- [HarmonyPatch(typeof(JobDriver_Sex), "Animate")]
- public class HarmonyPatch_Animate
- {
- public static bool Prefix(ref JobDriver_Sex __instance, ref Pawn pawn, ref Thing target)
- {
- //remove all bumping stuff in animations; keep draw nude code
- if (target != null)
- {
- Pawn pawn2 = target as Pawn;
- if (!__instance.isEndytophile)
- {
- SexUtility.DrawNude(pawn, false);
- if (pawn2 != null)
- {
- SexUtility.DrawNude(pawn2, false);
- return false;
- }
- }
- }
- else if (!__instance.isEndytophile)
- {
- SexUtility.DrawNude(pawn, false);
- }
-
- return false;
- }
- }
-}
diff --git a/1.5/Source/Patches/RJWPatches/JobDrivers/SexBaseReceivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs b/1.5/Source/Patches/RJWPatches/JobDrivers/SexBaseReceivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs
index ca4df23..6c4faa8 100644
--- a/1.5/Source/Patches/RJWPatches/JobDrivers/SexBaseReceivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs
+++ b/1.5/Source/Patches/RJWPatches/JobDrivers/SexBaseReceivers/HarmonyPatch_JobDriver_SexBaseReceiverLoved.cs
@@ -1,10 +1,8 @@
using HarmonyLib;
-using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using Verse.AI;
@@ -21,32 +19,5 @@ namespace Rimworld_Animations
AnimationUtility.StopGroupAnimation(__instance.pawn);
});
}
-
- public static IEnumerable Transpiler(IEnumerable codeInstructions)
- {
-
- var ins = codeInstructions.ToList();
- for (int i = 0; i < ins.Count; i++)
- {
- if (i < ins.Count && ins[i].opcode == OpCodes.Call && ins[i].OperandIs(AccessTools.DeclaredMethod(typeof(Toils_LayDown), "LayDown")))
- {
-
- ins[i].operand = AccessTools.DeclaredMethod(typeof(HarmonyPatch_JobDriver_SexBaseReceiverLoved), "DoNotLayDown");
- yield return ins[i];
-
- }
-
- else
- {
- yield return ins[i];
- }
- }
-
- }
-
- public static Toil DoNotLayDown(TargetIndex bedOrRestSpotIndex, bool hasBed, bool lookForOtherJobs, bool canSleep = true, bool gainRestAndHealth = true, PawnPosture noBedLayingPosture = PawnPosture.LayingMask, bool deathrest = false)
- {
- return new Toil();
- }
}
}
diff --git a/1.5/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderTree.cs b/1.5/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderTree.cs
index b79853f..621b881 100644
--- a/1.5/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderTree.cs
+++ b/1.5/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderTree.cs
@@ -38,19 +38,9 @@ namespace Rimworld_Animations
* Set Render Node to absolute position
*/
if (node.Props is PawnRenderNodeProperties_GraphicVariants graphicVariantProp
- && graphicVariantProp.absoluteTransform)
+ && graphicVariantProp.absolutePosition)
{
matrix = parms.matrix;
-
- //absolute transform -- just use the node's transform, not its ancestors
- node.GetTransform(parms, out Vector3 offset, out Vector3 pivot, out Quaternion quaternion, out Vector3 scale);
-
- if (offset != Vector3.zero) matrix *= Matrix4x4.Translate(offset);
- if (pivot != Vector3.zero) matrix *= Matrix4x4.Translate(pivot);
- if (quaternion != Quaternion.identity) matrix *= Matrix4x4.Rotate(quaternion);
- if (scale != Vector3.one) matrix *= Matrix4x4.Scale(scale);
- if (pivot != Vector3.zero) matrix *= Matrix4x4.Translate(scale).inverse;
-
float num = node.Worker.AltitudeFor(node, parms);
if (num != 0f)
{
diff --git a/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNodeProperties_GraphicHediffVariants.cs b/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNodeProperties_GraphicHediffVariants.cs
deleted file mode 100644
index 894c085..0000000
--- a/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNodeProperties_GraphicHediffVariants.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Verse;
-
-namespace Rimworld_Animations
-{
- public class PawnRenderNodeProperties_GraphicHediffVariants : PawnRenderNodeProperties_GraphicVariants
- {
-
- public List hediffVariants;
-
- }
-
- public class TexPathVariants_Hediff
- {
-
- public List hediffs;
- public TexPathVariantsDef texPathVariantsDef;
-
- }
-
-
-}
diff --git a/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNodeWorker_GraphicHediffVariants.cs b/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNodeWorker_GraphicHediffVariants.cs
deleted file mode 100644
index 24a10dc..0000000
--- a/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNodeWorker_GraphicHediffVariants.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Rimworld_Animations
-{
- public class PawnRenderNodeWorker_GraphicHediffVariants : PawnRenderNodeWorker_GraphicVariants
- {
- //same functionality as graphicvariants worker
- //just here for readability
-
- }
-}
diff --git a/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNode_GraphicHediffVariants.cs b/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNode_GraphicHediffVariants.cs
deleted file mode 100644
index 8d78dca..0000000
--- a/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNode_GraphicHediffVariants.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Verse;
-
-namespace Rimworld_Animations
-{
- public class PawnRenderNode_GraphicHediffVariants : PawnRenderNode_GraphicVariants
- {
-
- protected new PawnRenderNodeProperties_GraphicHediffVariants props;
- private HediffDef curHediff;
-
- public PawnRenderNode_GraphicHediffVariants(Pawn pawn, PawnRenderNodeProperties props, PawnRenderTree tree) : base(pawn, props, tree)
- {
-
- this.props = (PawnRenderNodeProperties_GraphicHediffVariants)props;
-
- }
-
- protected override Dictionary GraphicVariantsFor(Pawn pawn)
- {
-
- //for each different hediff-based texpathvariants,
- foreach (TexPathVariants_Hediff texPathVariant_Hediff in props.hediffVariants)
- {
- //for all the hediffs corresponding to that texpathvariant,
- foreach (HediffDef hediffDef in texPathVariant_Hediff.hediffs)
- {
- //if the pawn has that hediff,
- if (pawn.health.hediffSet.hediffs.Any((Hediff hediff) => hediff.def == hediffDef))
- {
- //return that specific variant
- curHediff = hediff.def;
- return GenerateVariants(pawn, texPathVariant_Hediff.texPathVariantsDef);
-
- }
- }
-
- }
-
- //otherwise just use default
- curHediff = null;
- return base.GraphicVariantsFor(pawn);
-
- }
-
- protected override void EnsureMaterialsInitialized()
- {
- //if pawn no longer has the hediff,
- if (curHediff == null ||
- (this.tree.pawn.health?.hediffSet?.hediffs is List hediffs
- && hediffs.Any((Hediff hediff) => hediff.def == curHediff)))
- {
- //redo graphicvariantsfor
- variants = GraphicVariantsFor(this.tree.pawn);
- }
-
- base.EnsureMaterialsInitialized();
- }
-
-
- }
-
-}
diff --git a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeProperties_GraphicVariants.cs b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeProperties_GraphicVariants.cs
index 15ac022..b1a8720 100644
--- a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeProperties_GraphicVariants.cs
+++ b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeProperties_GraphicVariants.cs
@@ -10,8 +10,8 @@ namespace Rimworld_Animations
public class PawnRenderNodeProperties_GraphicVariants : PawnRenderNodeProperties
{
- public TexPathVariantsDef texPathVariantsDef;
- public bool absoluteTransform = false;
+ public List texPathVariants;
+ public bool absolutePosition = false;
}
}
diff --git a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeWorker_GraphicVariants.cs b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeWorker_GraphicVariants.cs
index da96fe5..15b5a92 100644
--- a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeWorker_GraphicVariants.cs
+++ b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeWorker_GraphicVariants.cs
@@ -13,8 +13,6 @@ namespace Rimworld_Animations
public override bool CanDrawNow(PawnRenderNode node, PawnDrawParms parms)
{
- if (!base.CanDrawNow(node, parms)) return false;
-
if (parms.Portrait) return false;
//don't draw if not visible at tick
@@ -25,25 +23,21 @@ namespace Rimworld_Animations
}
- return true;
+ return base.CanDrawNow(node, parms);
}
protected override Material GetMaterial(PawnRenderNode node, PawnDrawParms parms)
{
//if node is animating, and is a graphic variant type of node
if ((node.AnimationWorker is AnimationWorker_KeyframesExtended extendedAnimWorker)
-
- //and node is one with graphic variants
&& (node is PawnRenderNode_GraphicVariants nodeWithGraphicVariants)
-
- //and texpathvariant is set
&& extendedAnimWorker.TexPathVariantAtTick(node.tree.AnimationTick) != null)
{
- Material materialVariant = GetMaterialVariant(nodeWithGraphicVariants, parms, (int)extendedAnimWorker.TexPathVariantAtTick(node.tree.AnimationTick));
- if (materialVariant != null) {
- return materialVariant;
- }
-
+ //if node has a graphic variant,
+ int variant = (int)extendedAnimWorker.TexPathVariantAtTick(node.tree.AnimationTick);
+
+ //return the variant
+ return GetMaterialVariant(nodeWithGraphicVariants, parms, variant);
}
//otherwise return original texture
@@ -53,9 +47,6 @@ namespace Rimworld_Animations
public virtual Material GetMaterialVariant(PawnRenderNode_GraphicVariants node, PawnDrawParms parms, int variant)
{
Material material = node.getGraphicVariant(variant).NodeGetMat(parms);
-
- if (material == null) return null;
-
if (material != null && !parms.Portrait && parms.flags.FlagSet(PawnRenderFlags.Invisible))
{
material = InvisibilityMatPool.GetInvisibleMat(material);
diff --git a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNode_GraphicVariants.cs b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNode_GraphicVariants.cs
index 24a74d6..fa46ce7 100644
--- a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNode_GraphicVariants.cs
+++ b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNode_GraphicVariants.cs
@@ -11,17 +11,11 @@ namespace Rimworld_Animations
public class PawnRenderNode_GraphicVariants : PawnRenderNode
{
- protected new PawnRenderNodeProperties_GraphicVariants props;
- protected Dictionary variants;
+ private new PawnRenderNodeProperties_GraphicVariants props;
+ private Dictionary variants;
public Graphic getGraphicVariant(int variant)
{
- if (!variants.ContainsKey(variant))
- {
- Log.ErrorOnce("[Anims] Error: tried to get key from variants that doesn't exist; key = " + variant, 2043428111);
- return null;
- }
-
return variants[variant];
}
@@ -44,24 +38,14 @@ namespace Rimworld_Animations
protected virtual Dictionary GraphicVariantsFor(Pawn pawn)
{
-
- return GenerateVariants(pawn, props.texPathVariantsDef);
-
- }
-
- protected Dictionary GenerateVariants(Pawn pawn, TexPathVariantsDef texPathVariants)
- {
-
Dictionary variantGraphics = new Dictionary();
-
- if (texPathVariants == null) return variantGraphics;
+ Shader shader = this.ShaderFor(pawn);
//for each graphic variant
- for (int i = 0; i < texPathVariants.variants.Count; i++)
+ for (int i = 0; i < props.texPathVariants.Count; i++)
{
-
//get new graphic
- Graphic variant = GraphicDatabase.Get(texPathVariants.variants[i], this.ShaderFor(pawn), Vector2.one, this.ColorFor(pawn));
+ Graphic variant = GraphicDatabase.Get(props.texPathVariants[i], shader, Vector2.one, this.ColorFor(pawn));
//add it to the variants dictionary; i + 1 for easier readability in logs
variantGraphics.Add(i + 1, variant);
@@ -69,7 +53,6 @@ namespace Rimworld_Animations
}
return variantGraphics;
-
}
diff --git a/1.5/Source/PawnRenderNode/TexPathVariants.cs b/1.5/Source/PawnRenderNode/TexPathVariants.cs
deleted file mode 100644
index d741756..0000000
--- a/1.5/Source/PawnRenderNode/TexPathVariants.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Verse;
-
-namespace Rimworld_Animations
-{
- public class TexPathVariantsDef : Def
- {
-
- public List variants;
-
- }
-}
diff --git a/1.5/Source/Utilities/AnimationUtility.cs b/1.5/Source/Utilities/AnimationUtility.cs
index e57a096..2431db7 100644
--- a/1.5/Source/Utilities/AnimationUtility.cs
+++ b/1.5/Source/Utilities/AnimationUtility.cs
@@ -95,11 +95,5 @@ namespace Rimworld_Animations {
}
-
- public static int GetAnimationLength(Pawn pawn)
- {
- return pawn.TryGetComp().AnimationLength;
- }
-
}
}
diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj
index bdf8615..e676bbd 100644
--- a/Rimworld-Animations.csproj
+++ b/Rimworld-Animations.csproj
@@ -46,7 +46,6 @@
..\rjw\1.5\Assemblies\RJW.dll
- False
..\rjw-toys-and-masturbation\Assemblies\RJW-ToysAndMasturbation.dll
@@ -105,22 +104,17 @@
-
-
-
+
+
-
-
-
-
@@ -132,17 +126,11 @@
-
-
-
+
-
-
-
-