コード例 #1
0
 public static bool PawnCanAutomaticallyHaul(Pawn p, Thing t, bool forced)
 {
     if (!t.def.EverHaulable)
     {
         return(false);
     }
     if (t.IsForbidden(p))
     {
         if (!t.Position.InAllowedArea(p))
         {
             JobFailReason.Is(HaulAIUtility.ForbiddenOutsideAllowedAreaLowerTrans);
         }
         else
         {
             JobFailReason.Is(HaulAIUtility.ForbiddenLowerTrans);
         }
         return(false);
     }
     if (!t.def.alwaysHaulable && t.Map.designationManager.DesignationOn(t, DesignationDefOf.Haul) == null && !t.IsInValidStorage())
     {
         return(false);
     }
     if (!HaulAIUtility.PawnCanAutomaticallyHaulBasicChecks(p, t, forced))
     {
         return(false);
     }
     return(true);
 }
コード例 #2
0
 public static bool PawnCanAutomaticallyHaulFast(Pawn p, Thing t, bool forced)
 {
     return(HaulAIUtility.PawnCanAutomaticallyHaulBasicChecks(p, t, forced));
 }