static bool Prefix(WorkGiver_Train __instance, Pawn pawn, Thing t, ref Job __result) { if (t is Pawn animal && animal.CurJobDef == GU_RR_DefOf.WaitForRider) { __result = null; return(false); } return(true); }
static bool Prefix(WorkGiver_Train __instance, Pawn pawn, Thing t, ref Job __result) { if (t is Pawn animal && animal.RaceProps.Animal && IsMountableUtility.IsCurrentlyMounted(animal)) { __result = null; return(false); } return(true); }
public static void Postfix(WorkGiver_Train __instance, Pawn pawn, Thing t, bool forced, Job __result) { if (__result != null && forced) { CompMeeseeksMemory memory = pawn.GetComp <CompMeeseeksMemory>(); if (memory != null) { memory.AddToPotentialTargetCache(__instance, t); } } }