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);
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
            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);
                    }
                }
            }