public static float AverageBeautyPerceptible(IntVec3 root, Map map)
        {
            float result;

            if (!root.IsValid || !root.InBounds(map))
            {
                result = 0f;
            }
            else
            {
                BeautyUtility.tempCountedThings.Clear();
                float num  = 0f;
                int   num2 = 0;
                BeautyUtility.FillBeautyRelevantCells(root, map);
                for (int i = 0; i < BeautyUtility.beautyRelevantCells.Count; i++)
                {
                    num += BeautyUtility.CellBeauty(BeautyUtility.beautyRelevantCells[i], map, BeautyUtility.tempCountedThings);
                    num2++;
                }
                BeautyUtility.tempCountedThings.Clear();
                if (num2 == 0)
                {
                    result = 0f;
                }
                else
                {
                    result = num / (float)num2;
                }
            }
            return(result);
        }
        public static float AverageBeautyPerceptible(IntVec3 root, Map map)
        {
            BeautyUtility.tempCountedThings.Clear();
            float num  = 0f;
            int   num2 = 0;

            BeautyUtility.FillBeautyRelevantCells(root, map);
            for (int i = 0; i < BeautyUtility.beautyRelevantCells.Count; i++)
            {
                num += BeautyUtility.CellBeauty(BeautyUtility.beautyRelevantCells[i], map, BeautyUtility.tempCountedThings);
                num2++;
            }
            num /= (float)num2;
            BeautyUtility.tempCountedThings.Clear();
            return(num);
        }