Beispiel #1
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            Main.NewText("The sky has been Fortified!");

            if (Main.dungeonX < Main.maxTilesX * .5f)
            {
                Center = (int)((double)Main.maxTilesX * 0.8);
            }
            else
            {
                Center = (int)((double)Main.maxTilesX * 0.2);
            }
            if (Main.maxTilesX > 8000)
            {
                lowerLimit            = 320;
                maxDistanceFromCenter = 750;
            }
            else if (Main.maxTilesX > 6000)
            {
                lowerLimit            = 230;
                maxDistanceFromCenter = 550;
            }
            else
            {
                lowerLimit            = 130;
                maxDistanceFromCenter = 320;
            }
            QwertyMethods.BreakTiles(Center - maxDistanceFromCenter, 0, maxDistanceFromCenter * 2, (int)(lowerLimit));
            //Main.NewText(maxDistanceFromCenter);

            //Main.NewText(Main.maxTilesX);
            if (Main.dungeonX < Main.maxTilesX * .5f)
            {
                startingX = (int)((double)Main.maxTilesX * 0.8);
            }
            else
            {
                startingX = (int)((double)Main.maxTilesX * 0.2);
            }
            //Main.NewText(startingX);
            int roomsPerLayer = 7;

            if (Main.maxTilesX > 8000)
            {
                roomsPerLayer += 4;
            }
            if (Main.maxTilesX > 6000)
            {
                roomsPerLayer += 4;
            }
            else
            {
            }
            int roomHeight     = 25;
            int roomWidth      = 25;
            int bridgeHeight   = 25;
            int bridgeWidth    = 75;
            int verticalHeight = 21;
            int verticalWith   = 25;
            int HeightOffset   = (roomHeight - 1) / 2;
            int WidthOffset    = (roomWidth - 1) / 2;
            int startingY      = 110;

            if (Main.maxTilesX > 8000)
            {
                startingY = 195;
            }
            else if (Main.maxTilesX > 6000)
            {
                startingY = 145;
            }
            else
            {
                startingY = 110;
            }
            if (Main.maxTilesX > 8000)
            {
                startingY -= 25;
            }
            startingX -= WidthOffset + (((roomsPerLayer - 1) / 2) * (roomWidth + bridgeWidth));
            startingY -= HeightOffset;



            int treasure = Main.rand.Next(roomsPerLayer - 1);

            if (treasure >= (roomsPerLayer - 1) / 2)
            {
                treasure++;
            }
            for (int n = 0; n < roomsPerLayer; n++)
            {
                if (n == (roomsPerLayer - 1) / 2)
                {
                    //Main.NewText(n + ", " + startingX + (n * (roomWidth + bridgeWidth)) + ", " + startingY);
                    generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY, -1);
                }
                else
                {
                    if (n == treasure)
                    {
                        //Main.NewText(n + ", " + startingX + (n * (roomWidth + bridgeWidth)) + ", " + startingY);
                        generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY, -2);
                    }
                    else
                    {
                        //Main.NewText(n + ", " + startingX + (n * (roomWidth + bridgeWidth)) + ", " + startingY);
                        generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY, 1);
                    }
                }

                if (n != roomsPerLayer - 1)
                {
                    generateBridge(startingX + roomWidth + (n * (roomWidth + bridgeWidth)), startingY, 0);
                }
            }
            treasure = Main.rand.Next(roomsPerLayer);
            for (int n = 0; n < roomsPerLayer; n++)
            {
                if (n == treasure)
                {
                    generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY - 1 * (roomHeight + verticalHeight), -2);
                }
                else
                {
                    generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY - 1 * (roomHeight + verticalHeight), 1);
                }
                Vertical(startingX + (n * (roomWidth + bridgeWidth)), startingY - 1 * (roomHeight + verticalHeight) + roomHeight, 1);
                if (n != roomsPerLayer - 1)
                {
                    generateBridge(startingX + roomWidth + (n * (roomWidth + bridgeWidth)), startingY - 1 * (roomHeight + verticalHeight), 0);
                }
            }
            if (Main.maxTilesX > 6000)
            {
                treasure = Main.rand.Next(roomsPerLayer);
                for (int n = 0; n < roomsPerLayer; n++)
                {
                    if (n == treasure)
                    {
                        generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY + 1 * (roomHeight + verticalHeight), -2);
                    }
                    else
                    {
                        generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY + 1 * (roomHeight + verticalHeight), 1);
                    }
                    Vertical(startingX + (n * (roomWidth + bridgeWidth)), startingY + 1 * (roomHeight + verticalHeight) - verticalHeight, 1);
                    if (n != roomsPerLayer - 1)
                    {
                        generateBridge(startingX + roomWidth + (n * (roomWidth + bridgeWidth)), startingY + 1 * (roomHeight + verticalHeight), 0);
                    }
                }
                treasure = Main.rand.Next(roomsPerLayer);
                for (int n = 0; n < roomsPerLayer; n++)
                {
                    if (n == treasure)
                    {
                        generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY - 2 * (roomHeight + verticalHeight), -2);
                    }
                    else
                    {
                        generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY - 2 * (roomHeight + verticalHeight), 1);
                    }
                    Vertical(startingX + (n * (roomWidth + bridgeWidth)), startingY - 2 * (roomHeight + verticalHeight) + roomHeight, 1);
                    if (n != roomsPerLayer - 1)
                    {
                        generateBridge(startingX + roomWidth + (n * (roomWidth + bridgeWidth)), startingY - 2 * (roomHeight + verticalHeight), 0);
                    }
                }
            }
            if (Main.maxTilesX > 8000)
            {
                treasure = Main.rand.Next(roomsPerLayer);
                for (int n = 0; n < roomsPerLayer; n++)
                {
                    if (n == treasure)
                    {
                        generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY + 2 * (roomHeight + verticalHeight), -2);
                    }
                    else
                    {
                        generateRoom(startingX + (n * (roomWidth + bridgeWidth)), startingY + 2 * (roomHeight + verticalHeight), 1);
                    }
                    Vertical(startingX + (n * (roomWidth + bridgeWidth)), startingY + 2 * (roomHeight + verticalHeight) - verticalHeight, 1);
                    if (n != roomsPerLayer - 1)
                    {
                        generateBridge(startingX + roomWidth + (n * (roomWidth + bridgeWidth)), startingY + 2 * (roomHeight + verticalHeight), 0);
                    }
                }
            }
        }
        public static void BuildFortress()
        {
            int lowerLimit;
            int upperLimit = 60;
            int CenterX;
            int maxDistanceFromCenter;
            int mediumRoomCount  = Main.rand.Next(8, 11);
            int smallRoomsPerMed = 2;
            int tinyRoomsPerMed  = 3;

            if (Main.dungeonX < Main.maxTilesX * .5f)
            {
                CenterX = (int)((double)Main.maxTilesX * 0.8);
            }
            else
            {
                CenterX = (int)((double)Main.maxTilesX * 0.2);
            }
            if (Main.maxTilesX > 8000)
            {
                lowerLimit            = 320;
                maxDistanceFromCenter = 750;
                mediumRoomCount      *= 6;
            }
            else if (Main.maxTilesX > 6000)
            {
                lowerLimit            = 230;
                maxDistanceFromCenter = 550;
                mediumRoomCount      *= 3;
            }
            else
            {
                lowerLimit            = 130;
                maxDistanceFromCenter = 320;
            }
            int     height  = lowerLimit - upperLimit;
            Vector2 topLeft = new Vector2(CenterX - maxDistanceFromCenter, upperLimit);

            QwertyMethods.BreakTiles(CenterX - maxDistanceFromCenter, 0, maxDistanceFromCenter * 2, (int)(lowerLimit));
            bool[,] region = new bool[maxDistanceFromCenter * 2, height];

            /*
             * for(int i = 0; i < region.GetLength(0); i++)
             * {
             *  for(int j = 0; i < region.GetLength(1); j++)
             *  {
             *      region[i, j] = false;
             *  }
             * }*/
            Vector2 offset = new Vector2(maxDistanceFromCenter - Fortress2Blueprints.AltarRooms.GetLength(3) / 2, height / 2 - Fortress2Blueprints.AltarRooms.GetLength(2) / 2);

            Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.AltarRoomTileTypes, Fortress2Blueprints.AltarRooms);
            OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.AltarRooms.GetLength(3), Fortress2Blueprints.AltarRooms.GetLength(2), ref region);
            int l = 4;

            if (Main.maxTilesX < 6000)
            {
                //for (int l/2 = 1; l/2 < l; l/2++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && l / 2 % 2 == 0) || (b % 2 == 0 && l / 2 % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.LargeRooms.GetLength(3) / 2, l / 2 * height / l - Fortress2Blueprints.LargeRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.LargeRooms.GetLength(3), Fortress2Blueprints.LargeRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.LargeRoomTileTypes, Fortress2Blueprints.LargeRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.LargeRooms.GetLength(3), Fortress2Blueprints.LargeRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }

                l = 8;
                // for (int l/2 = 1; l/2 < l; l/2++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && l / 2 % 2 == 0) || (b % 2 == 0 && l / 2 % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.MediumRooms.GetLength(3) / 2, l / 2 * height / l - Fortress2Blueprints.MediumRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.MediumRooms.GetLength(3), Fortress2Blueprints.MediumRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.MediumRoomTileTypes, Fortress2Blueprints.MediumRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.MediumRooms.GetLength(3), Fortress2Blueprints.MediumRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }
                l = 16;

                //for (int l/2 = 1; l/2 < l; l/2++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && l / 2 % 2 == 0) || (b % 2 == 0 && l / 2 % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.SmallRooms.GetLength(3) / 2, l / 2 * height / l - Fortress2Blueprints.SmallRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.SmallRooms.GetLength(3), Fortress2Blueprints.SmallRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.SmallRoomTileTypes, Fortress2Blueprints.SmallRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.SmallRooms.GetLength(3), Fortress2Blueprints.SmallRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }

                l = 32;
                //for (int l/2 = 1; l/2 < l; l/2++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && l / 2 % 2 == 0) || (b % 2 == 0 && l / 2 % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.TinyRooms.GetLength(3) / 2, l / 2 * height / l - Fortress2Blueprints.TinyRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.TinyRooms.GetLength(3), Fortress2Blueprints.TinyRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.TinyRoomTileTypes, Fortress2Blueprints.TinyRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.TinyRooms.GetLength(3), Fortress2Blueprints.TinyRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }
            }
            else if (Main.maxTilesX < 8000)
            {
                for (int q = 1; q < l; q++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.LargeRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.LargeRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.LargeRooms.GetLength(3), Fortress2Blueprints.LargeRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.LargeRoomTileTypes, Fortress2Blueprints.LargeRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.LargeRooms.GetLength(3), Fortress2Blueprints.LargeRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }

                l = 6;
                for (int q = 1; q < l; q++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.MediumRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.MediumRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.MediumRooms.GetLength(3), Fortress2Blueprints.MediumRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.MediumRoomTileTypes, Fortress2Blueprints.MediumRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.MediumRooms.GetLength(3), Fortress2Blueprints.MediumRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }
                l = 12;

                for (int q = 1; q < l; q++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.SmallRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.SmallRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.SmallRooms.GetLength(3), Fortress2Blueprints.SmallRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.SmallRoomTileTypes, Fortress2Blueprints.SmallRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.SmallRooms.GetLength(3), Fortress2Blueprints.SmallRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }

                l = 18;
                for (int q = 1; q < l; q++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.TinyRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.TinyRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.TinyRooms.GetLength(3), Fortress2Blueprints.TinyRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.TinyRoomTileTypes, Fortress2Blueprints.TinyRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.TinyRooms.GetLength(3), Fortress2Blueprints.TinyRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }
            }
            else
            {
                for (int q = 1; q < l; q++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.LargeRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.LargeRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.LargeRooms.GetLength(3), Fortress2Blueprints.LargeRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.LargeRoomTileTypes, Fortress2Blueprints.LargeRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.LargeRooms.GetLength(3), Fortress2Blueprints.LargeRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }

                l = 8;
                for (int q = 1; q < l; q++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.MediumRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.MediumRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.MediumRooms.GetLength(3), Fortress2Blueprints.MediumRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.MediumRoomTileTypes, Fortress2Blueprints.MediumRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.MediumRooms.GetLength(3), Fortress2Blueprints.MediumRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }
                l = 16;

                for (int q = 1; q < l; q++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.SmallRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.SmallRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.SmallRooms.GetLength(3), Fortress2Blueprints.SmallRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.SmallRoomTileTypes, Fortress2Blueprints.SmallRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.SmallRooms.GetLength(3), Fortress2Blueprints.SmallRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }

                l = 32;
                for (int q = 1; q < l; q++)
                {
                    for (int b = 1; b < l; b++)
                    {
                        if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
                        {
                            offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.TinyRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.TinyRooms.GetLength(2) / 2);
                            if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.TinyRooms.GetLength(3), Fortress2Blueprints.TinyRooms.GetLength(2), region))
                            {
                                Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.TinyRoomTileTypes, Fortress2Blueprints.TinyRooms);
                                OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.TinyRooms.GetLength(3), Fortress2Blueprints.TinyRooms.GetLength(2), ref region);
                            }
                        }
                    }
                }
            }

            /*
             * int l = 4;
             * for(int q =1; q< l; q++)
             * {
             *  for(int b =1; b < l; b++)
             *  {
             *      if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
             *      {
             *          offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.LargeRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.LargeRooms.GetLength(2) / 2);
             *          if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.LargeRooms.GetLength(3), Fortress2Blueprints.LargeRooms.GetLength(2), region))
             *          {
             *              Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.LargeRoomTileTypes, Fortress2Blueprints.LargeRooms);
             *              OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.LargeRooms.GetLength(3), Fortress2Blueprints.LargeRooms.GetLength(2), ref region);
             *          }
             *      }
             *  }
             * }
             *
             * l = 8;
             * for (int q = 1; q < l; q++)
             * {
             *  for (int b = 1; b < l; b++)
             *  {
             *      if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
             *      {
             *          offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.MediumRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.MediumRooms.GetLength(2) / 2);
             *          if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.MediumRooms.GetLength(3), Fortress2Blueprints.MediumRooms.GetLength(2), region))
             *          {
             *              Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.MediumRoomTileTypes, Fortress2Blueprints.MediumRooms);
             *              OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.MediumRooms.GetLength(3), Fortress2Blueprints.MediumRooms.GetLength(2), ref region);
             *          }
             *      }
             *  }
             * }
             * l = 16;
             *
             * for (int q = 1; q < l; q++)
             * {
             *  for (int b = 1; b < l; b++)
             *  {
             *      if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
             *      {
             *          offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.SmallRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.SmallRooms.GetLength(2) / 2);
             *          if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.SmallRooms.GetLength(3), Fortress2Blueprints.SmallRooms.GetLength(2), region))
             *          {
             *              Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.SmallRoomTileTypes, Fortress2Blueprints.SmallRooms);
             *              OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.SmallRooms.GetLength(3), Fortress2Blueprints.SmallRooms.GetLength(2), ref region);
             *          }
             *      }
             *  }
             * }
             * l = 32;
             * for (int q = 1; q < l; q++)
             * {
             *  for (int b = 1; b < l; b++)
             *  {
             *      if ((b % 2 != 0 && q % 2 == 0) || (b % 2 == 0 && q % 2 != 0))
             *      {
             *          offset = new Vector2(b * 2 * maxDistanceFromCenter / l - Fortress2Blueprints.TinyRooms.GetLength(3) / 2, q * height / l - Fortress2Blueprints.TinyRooms.GetLength(2) / 2);
             *          if (CheckRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.TinyRooms.GetLength(3), Fortress2Blueprints.TinyRooms.GetLength(2), region))
             *          {
             *              Fortress2Blueprints.BuildRoom((int)(topLeft.X + offset.X), (int)(topLeft.Y + offset.Y), Fortress2Blueprints.TinyRoomTileTypes, Fortress2Blueprints.TinyRooms);
             *              OccupyRegion((int)offset.X, (int)offset.Y, Fortress2Blueprints.TinyRooms.GetLength(3), Fortress2Blueprints.TinyRooms.GetLength(2), ref region);
             *          }
             *      }
             *  }
             * }
             */
            /*
             * for (int i = 0; i < mediumRoomCount; i++)
             * {
             *   AttemptRoomPlace(topLeft, Fortress2Blueprints.MediumRoomTileTypes, Fortress2Blueprints.MediumRooms, ref region);
             *   for (int k = 0; k < smallRoomsPerMed; k++)
             *   {
             *       AttemptRoomPlace(topLeft, Fortress2Blueprints.SmallRoomTileTypes, Fortress2Blueprints.SmallRooms, ref region);
             *   }
             *   for (int k = 0; k < tinyRoomsPerMed; k++)
             *   {
             *       AttemptRoomPlace(topLeft, Fortress2Blueprints.TinyRoomTileTypes, Fortress2Blueprints.TinyRooms, ref region);
             *   }
             * }*/
        }