mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
25 lines
691 B
C#
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);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|