public bool EnoughAmmoAround(Building_TurretGunCE turret)
        {
            //Prevent ammo being dropped as a result of the turret being reloaded at the time
            if (turret.GetReloading() || turret.ShouldReload(1.0f))
            {
                return(true);
            }

            var ammoComp = turret.CompAmmo;

            int num  = GenRadial.NumCellsInRadius(20f);
            int num2 = ammoComp.CurMagCount;
            int num3 = Mathf.CeilToInt((float)ammoComp.Props.magazineSize / 6f);

            for (int i = 0; i < num; i++)
            {
                IntVec3 c = parent.Position + GenRadial.RadialPattern[i];
                if (c.InBounds(parent.Map))
                {
                    List <Thing> thingList = c.GetThingList(parent.Map);
                    for (int j = 0; j < thingList.Count; j++)
                    {
                        if ((ammoComp != null && ammoComp.CurrentAmmo == thingList[j].def))
                        {
                            num2 += thingList[j].stackCount;

                            if (num2 > num3)
                            {
                                return(true);
                            }
                        }
                    }
                }
            }

            return(false);
        }