mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
26 lines
767 B
C#
26 lines
767 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) {
|
|
if (AnimationSettings.debugMode || RJWSettings.DevMode)
|
|
Log.Message("Replacing vanilla RJW JoinInBed JobDriver for animation JobDriver");
|
|
job = new Job(DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true), job.targetA, job.targetB, job.targetC);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|