rimworld-animations/Source/Patches/rjwPatches/HarmonyPatch_PlayAnimJoinInBedRMB.cs
2020-07-24 16:36:11 -07:00

25 lines
691 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse.AI;
using rjw;
using HarmonyLib;
using Verse;
namespace Rimworld_Animations {
[HarmonyPatch(typeof(Pawn_JobTracker), "TryTakeOrderedJob")]
class HarmonyPatch_PlayAnimJoinInBedRMB {
public static void Prefix(ref Job job) {
if(job.def == xxx.casual_sex) {
Log.Message("Replacing vanilla RJW JoinInBed JobDriver for animation JobDriver");
job = new Job(DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true), job.targetA, job.targetB, job.targetC);
}
}
}
}