// Token: 0x060029E4 RID: 10724 RVA: 0x0013D3DC File Offset: 0x0013B7DC
        public static IntVec3 FindChildHiveLocation(IntVec3 pos, Map map, ThingDef parentDef, CompProperties_Spawner_HiveLike_CrashedShipPart props, bool ignoreRoofedRequirement, bool allowUnreachable)
        {
            IntVec3 intVec = IntVec3.Invalid;

            for (int i = 0; i < 3; i++)
            {
                float minDist = props.HiveSpawnPreferredMinDist;
                bool  flag;
                if (i < 2)
                {
                    if (i == 1)
                    {
                        minDist = 0f;
                    }
                    flag = CellFinder.TryFindRandomReachableCellNear(pos, map, props.HiveSpawnRadius, TraverseParms.For(TraverseMode.NoPassClosedDoors, Danger.Deadly, false), (IntVec3 c) => CompSpawner_HiveLike_CrashedShipPart.CanSpawnHiveAt(c, map, pos, parentDef, minDist, ignoreRoofedRequirement), null, out intVec, 999999);
                }
                else
                {
                    flag = (allowUnreachable && CellFinder.TryFindRandomCellNear(pos, map, (int)props.HiveSpawnRadius, (IntVec3 c) => CompSpawner_HiveLike_CrashedShipPart.CanSpawnHiveAt(c, map, pos, parentDef, minDist, ignoreRoofedRequirement), out intVec, -1));
                }
                if (flag)
                {
                    intVec = CellFinder.FindNoWipeSpawnLocNear(intVec, map, parentDef, Rot4.North, 2, (IntVec3 c) => CompSpawner_HiveLike_CrashedShipPart.CanSpawnHiveAt(c, map, pos, parentDef, minDist, ignoreRoofedRequirement));
                    break;
                }
            }
            return(intVec);
        }