Exemplo n.º 1
0
 public static TargetInfo ResolvePathMode(Pawn pawn, TargetInfo dest, ref PathEndMode peMode, MapExtension mapE)
 {
     if (dest.HasThing && dest.Thing.Spawned)
     {
         peMode = PathEndMode.Touch;
         return(dest);
     }
     if (peMode == PathEndMode.InteractionCell)
     {
         if (!dest.HasThing)
         {
             Log.Error("Pathed to cell " + dest + " with PathEndMode.InteractionCell.", false);
         }
         peMode = PathEndMode.OnCell;
         return(new TargetInfo(dest.Thing.InteractionCell, dest.Thing.Map, false));
     }
     if (peMode == PathEndMode.ClosestTouch)
     {
         peMode = GenPathShip.ResolveClosestTouchPathMode(pawn, mapE, dest.Cell);
     }
     return(dest);
 }