public static bool CanJump(GlobalTargetInfo target)
        {
            bool result;

            if (!target.IsValid)
            {
                result = false;
            }
            else
            {
                target = CameraJumper.GetAdjustedTarget(target);
                if (target.HasThing)
                {
                    result = (target.Thing.MapHeld != null && Find.Maps.Contains(target.Thing.MapHeld) && target.Thing.PositionHeld.IsValid && target.Thing.PositionHeld.InBounds(target.Thing.MapHeld));
                }
                else if (target.HasWorldObject)
                {
                    result = (target.WorldObject.Tile >= 0);
                }
                else if (target.Cell.IsValid)
                {
                    result = (target.Map != null && Find.Maps.Contains(target.Map) && target.Cell.IsValid && target.Cell.InBounds(target.Map));
                }
                else
                {
                    result = (target.Tile >= 0);
                }
            }
            return(result);
        }
		public static GlobalTargetInfo GetWorldTarget(GlobalTargetInfo target)
		{
			GlobalTargetInfo adjustedTarget = CameraJumper.GetAdjustedTarget(target);
			if (!adjustedTarget.IsValid)
			{
				return GlobalTargetInfo.Invalid;
			}
			if (adjustedTarget.IsWorldTarget)
			{
				return adjustedTarget;
			}
			return CameraJumper.GetWorldTargetOfMap(adjustedTarget.Map);
		}
 public static void TrySelect(GlobalTargetInfo target)
 {
     if (target.IsValid)
     {
         target = CameraJumper.GetAdjustedTarget(target);
         if (target.HasThing)
         {
             CameraJumper.TrySelectInternal(target.Thing);
         }
         else if (target.HasWorldObject)
         {
             CameraJumper.TrySelectInternal(target.WorldObject);
         }
     }
 }
        public static GlobalTargetInfo GetWorldTarget(GlobalTargetInfo target)
        {
            GlobalTargetInfo adjustedTarget = CameraJumper.GetAdjustedTarget(target);
            GlobalTargetInfo result;

            if (adjustedTarget.IsValid)
            {
                if (adjustedTarget.IsWorldTarget)
                {
                    result = adjustedTarget;
                }
                else
                {
                    result = CameraJumper.GetWorldTargetOfMap(adjustedTarget.Map);
                }
            }
            else
            {
                result = GlobalTargetInfo.Invalid;
            }
            return(result);
        }
 public static void TryJump(GlobalTargetInfo target)
 {
     if (target.IsValid)
     {
         target = CameraJumper.GetAdjustedTarget(target);
         if (target.HasThing)
         {
             CameraJumper.TryJumpInternal(target.Thing);
         }
         else if (target.HasWorldObject)
         {
             CameraJumper.TryJumpInternal(target.WorldObject);
         }
         else if (target.Cell.IsValid)
         {
             CameraJumper.TryJumpInternal(target.Cell, target.Map);
         }
         else
         {
             CameraJumper.TryJumpInternal(target.Tile);
         }
     }
 }