diff --git a/1.5/Assemblies/Rimworld-Animations.dll b/1.5/Assemblies/Rimworld-Animations.dll index 2f80317..8e79dcf 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/GroupAnimationDefs/Blowjob/OffsetDef_Blowjob.xml b/1.5/Defs/GroupAnimationDefs/Blowjob/OffsetDef_Blowjob.xml index 039648d..fb69523 100644 --- a/1.5/Defs/GroupAnimationDefs/Blowjob/OffsetDef_Blowjob.xml +++ b/1.5/Defs/GroupAnimationDefs/Blowjob/OffsetDef_Blowjob.xml @@ -24,6 +24,17 @@
  • Hulk(0, 0, 0.223)
  • + diff --git a/1.5/Source/Animations/AnimationOffsets/Offsets/AnimationOffset_AgeRange.cs b/1.5/Source/Animations/AnimationOffsets/Offsets/AnimationOffset_AgeRange.cs new file mode 100644 index 0000000..f9134a3 --- /dev/null +++ b/1.5/Source/Animations/AnimationOffsets/Offsets/AnimationOffset_AgeRange.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; +using Verse; + +namespace Rimworld_Animations +{ + public class AnimationOffset_AgeRange : BaseAnimationOffset + { + public List offsetsMale; + public List offsetsFemale; + + public override Vector3? getOffset(Pawn pawn) + { + List pawnOffsets = (pawn.gender == Gender.Male ? offsetsMale : offsetsFemale); + return pawnOffsets.Find(x => x.bodyType == pawn.story.bodyType && x.ageRange.Includes(pawn.ageTracker.AgeBiologicalYears))?.offset ?? pawnOffsets.Last().offset; + } + + public override int? getRotation(Pawn pawn) + { + List pawnOffsets = (pawn.gender == Gender.Male ? offsetsMale : offsetsFemale); + return pawnOffsets.Find(x => x.bodyType == pawn.story.bodyType && x.ageRange.Includes(pawn.ageTracker.AgeBiologicalYears))?.rotation ?? pawnOffsets.Last().rotation; + } + } + + public class BodyTypeOffset_AgeRange : BodyTypeOffset + { + public FloatRange ageRange; + + } +} diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj index 9e14a16..a43e63e 100644 --- a/Rimworld-Animations.csproj +++ b/Rimworld-Animations.csproj @@ -77,6 +77,7 @@ +