public static bool CanReachImmediate(IntVec3 start, LocalTargetInfo target, Map map, PathEndMode peMode, Pawn pawn)
        {
            if (!target.IsValid)
            {
                return(false);
            }
            target = (LocalTargetInfo)GenPath.ResolvePathMode(pawn, target.ToTargetInfo(map), ref peMode);
            if (target.HasThing)
            {
                Thing thing = target.Thing;
                if (thing.Spawned)
                {
                    if (thing.Map != map)
                    {
                        return(false);
                    }
                    goto IL_00d3;
                }
                if (pawn != null)
                {
                    if (pawn.carryTracker.innerContainer.Contains(thing))
                    {
                        return(true);
                    }
                    if (pawn.inventory.innerContainer.Contains(thing))
                    {
                        return(true);
                    }
                    if (pawn.apparel != null && pawn.apparel.Contains(thing))
                    {
                        return(true);
                    }
                    if (pawn.equipment != null && pawn.equipment.Contains(thing))
                    {
                        return(true);
                    }
                }
                return(false);
            }
            goto IL_00d3;
IL_00d3:
            if (!target.HasThing || (target.Thing.def.size.x == 1 && target.Thing.def.size.z == 1))
            {
                if (start == target.Cell)
                {
                    return(true);
                }
            }
            else if (start.IsInside(target.Thing))
            {
                return(true);
            }
            if (peMode == PathEndMode.Touch && TouchPathEndModeUtility.IsAdjacentOrInsideAndAllowedToTouch(start, target, map))
            {
                return(true);
            }
            return(false);
        }