diff --git a/1.1/Assemblies/Rimworld-Animations.dll b/1.1/Assemblies/Rimworld-Animations.dll index 3ffb81f..adf6fc4 100644 Binary files a/1.1/Assemblies/Rimworld-Animations.dll and b/1.1/Assemblies/Rimworld-Animations.dll differ diff --git a/About/About.xml b/About/About.xml index 6bc9592..1c8f765 100644 --- a/About/About.xml +++ b/About/About.xml @@ -2,7 +2,8 @@ Rimworld-Animations - Platinumspoons + C0ffee + https://gitgud.io/Platinumspoons/rimworld-animations/
  • 1.1
  • @@ -20,12 +21,23 @@ https://github.com/UnlimitedHugs/RimworldHugsLib/releases/latest steam://url/CommunityFilePage/818773962 +
  • + rim.job.world + RimJobWorld + https://www.loverslab.com/topic/110270-mod-rimjobworld/ +
  • UnlimitedHugs.HugsLib
  • brrainz.harmony
  • +
  • rim.job.world
  • -Rimworld Animations! Hurray! - + Rimworld Animations! Hurray! + + Questions or bugs? + Chat with me on the forums: https://www.loverslab.com/topic/140386-rjw-animations/ + Or on the rjw discord: https://discord.gg/CXwHhv8 + +
    diff --git a/Defs/AnimationDefs/Animations_Masturbate.xml b/Defs/AnimationDefs/Animations_Masturbate.xml index 41b633c..2968fa1 100644 --- a/Defs/AnimationDefs/Animations_Masturbate.xml +++ b/Defs/AnimationDefs/Animations_Masturbate.xml @@ -2,8 +2,8 @@ \ No newline at end of file diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj index d7b24af..5a34225 100644 --- a/Rimworld-Animations.csproj +++ b/Rimworld-Animations.csproj @@ -90,6 +90,7 @@ + diff --git a/Source/JobDrivers/JobDriver_SexCasualForAnimation.cs b/Source/JobDrivers/JobDriver_SexCasualForAnimation.cs index 0100f96..ee111f9 100644 --- a/Source/JobDrivers/JobDriver_SexCasualForAnimation.cs +++ b/Source/JobDrivers/JobDriver_SexCasualForAnimation.cs @@ -38,7 +38,6 @@ namespace Rimworld_Animations { Toil startPartnerSex = new Toil(); startPartnerSex.initAction = delegate { - Log.Message("Attempting to start job..."); Job gettinLovedJob = JobMaker.MakeJob(DefDatabase.GetNamed("GettinLovedAnimation"), pawn, Bed); // new gettin loved toil that wakes up the pawn goes here Partner.jobs.jobQueue.EnqueueFirst(gettinLovedJob); diff --git a/Source/Patches/rjwPatches/HarmonyPatch_DoLovinAnimationPatch.cs b/Source/Patches/rjwPatches/HarmonyPatch_DoLovinAnimationPatch.cs new file mode 100644 index 0000000..a69a068 --- /dev/null +++ b/Source/Patches/rjwPatches/HarmonyPatch_DoLovinAnimationPatch.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using HarmonyLib; +using RimWorld; +using Verse; +using rjw; +using Verse.AI; + +namespace Rimworld_Animations { + + [HarmonyPatch(typeof(JobGiver_DoLovin), "TryGiveJob")] + public static class HarmonyPatch_DoLovinAnimationPatch { + + public static void Postfix(ref Pawn pawn, ref Job __result) { + + if(__result != null) { + + RestUtility.WakeUp(pawn); + Pawn partnerInMyBed = LovePartnerRelationUtility.GetPartnerInMyBed(pawn); + __result = JobMaker.MakeJob(DefDatabase.GetNamed("JoinInBedAnimation", true), partnerInMyBed, partnerInMyBed.CurrentBed()); + } + + } + } +} diff --git a/Source/Patches/rjwPatches/HarmonyPatch_JobDriver_SexBaseInitiator.cs b/Source/Patches/rjwPatches/HarmonyPatch_JobDriver_SexBaseInitiator.cs index d3e0f6f..35331b0 100644 --- a/Source/Patches/rjwPatches/HarmonyPatch_JobDriver_SexBaseInitiator.cs +++ b/Source/Patches/rjwPatches/HarmonyPatch_JobDriver_SexBaseInitiator.cs @@ -107,6 +107,37 @@ namespace Rimworld_Animations { public static void Postfix(ref JobDriver_SexBaseInitiator __instance) { + //Stolen from vanilla lovin + //to make sure vanilla lovin variables are set + if(__instance.pawn?.mindState?.canLovinTick != null) { + + SimpleCurve LovinIntervalHoursFromAgeCurve = new SimpleCurve + { + new CurvePoint(16f, 1.5f), + new CurvePoint(22f, 1.5f), + new CurvePoint(30f, 4f), + new CurvePoint(50f, 12f), + new CurvePoint(75f, 36f) + }; + + int ticksToNextLovin; + if (DebugSettings.alwaysDoLovin) { + + ticksToNextLovin = 100; + + } else { + + float centerX = LovinIntervalHoursFromAgeCurve.Evaluate(__instance.pawn.ageTracker.AgeBiologicalYearsFloat); + + centerX = Rand.Gaussian(centerX, 0.3f); + if (centerX < 0.5f) { + centerX = 0.5f; + } + ticksToNextLovin = (int)(centerX * 2500f); + } + __instance.pawn.mindState.canLovinTick = Find.TickManager.TicksGame + ticksToNextLovin; + } + if (__instance.Target.jobs?.curDriver is JobDriver_SexBaseReciever) { if (__instance.pawn.TryGetComp().isAnimating) {