static void ClearTrackingAfterUnload(JobDriver __instance) { Debug.WriteLine($"{RealTime.frameCount} {__instance.pawn} STARTED UNLOAD."); __instance.AddFinishAction( () => { haulTrackers.Remove(__instance.pawn); Debug.WriteLine($"{RealTime.frameCount} {__instance.pawn} FINISHED UNLOAD. Wiped tracking."); }); }
public static void KeepLyingDown(this JobDriver driver, TargetIndex bedIndex) { driver.AddFinishAction(delegate { Pawn pawn = driver.pawn; if (!pawn.Drafted) { pawn.jobs.jobQueue.EnqueueFirst(new Job(JobDefOf.LayDown, pawn.CurJob.GetTarget(bedIndex))); } }); }
static void AddJooFinish(JobDriver __instance) { __instance.AddFinishAction(() => Hauling.pawnHaulToCell.Remove(__instance.pawn)); }