public static void MakeGuardTowers(BlockManager bm, int intFarmSize, int intMapSize, bool booIncludeWalls, string strOutsideLights, string strFireBeacons) { // remove wall BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 11, 64, 79, intFarmSize + 5, intFarmSize + 11, (int)BlockType.AIR, 1); // add tower BlockShapes.MakeHollowBox(intFarmSize + 4, intFarmSize + 12, 63, 80, intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1); // divide into two rooms BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 12, 2, 72, intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1); BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 11, 64, 67, intFarmSize + 5, intFarmSize + 11, (int)BlockType.AIR, 1); switch (strOutsideLights) { case "Fire": for (int y = 72; y <= 79; y += 7) { BlockShapes.MakeBlock(intFarmSize + 6, y, intFarmSize + 3, (int)BlockType.NETHERRACK, 2); BlockShapes.MakeBlock(intFarmSize + 6, y + 1, intFarmSize + 3, (int)BlockType.FIRE, 2); BlockShapes.MakeBlock(intFarmSize + 10, y, intFarmSize + 3, (int)BlockType.NETHERRACK, 2); BlockShapes.MakeBlock(intFarmSize + 10, y + 1, intFarmSize + 3, (int)BlockType.FIRE, 2); } break; case "Torches": for (int y = 73; y <= 80; y += 7) { BlockHelper.MakeTorch(intFarmSize + 6, y, intFarmSize + 3, (int)BlockType.STONE, 2); BlockHelper.MakeTorch(intFarmSize + 10, y, intFarmSize + 3, (int)BlockType.STONE, 2); } break; } // add torches BlockHelper.MakeTorch(intFarmSize + 6, 79, intFarmSize + 13, (int)BlockType.STONE, 2); BlockHelper.MakeTorch(intFarmSize + 10, 79, intFarmSize + 13, (int)BlockType.STONE, 2); // add torches inside BlockHelper.MakeTorch(intFarmSize + 6, 77, intFarmSize + 11, (int)BlockType.STONE, 2); BlockHelper.MakeTorch(intFarmSize + 10, 77, intFarmSize + 11, (int)BlockType.STONE, 2); BlockHelper.MakeTorch(intFarmSize + 5, 77, intFarmSize + 6, (int)BlockType.STONE, 2); BlockHelper.MakeTorch(intFarmSize + 5, 77, intFarmSize + 10, (int)BlockType.STONE, 2); // add openings to the walls BlockShapes.MakeBlock(intFarmSize + 7, 73, intFarmSize + 12, (int)BlockType.AIR, 2); BlockShapes.MakeBlock(intFarmSize + 9, 73, intFarmSize + 12, (int)BlockType.AIR, 2); BlockShapes.MakeBlock(intFarmSize + 7, 74, intFarmSize + 12, (int)BlockType.AIR, 2); BlockShapes.MakeBlock(intFarmSize + 9, 74, intFarmSize + 12, (int)BlockType.AIR, 2); // add blocks on top of the towers BlockShapes.MakeHollowLayers(intFarmSize + 4, intFarmSize + 12, 81, 81, intFarmSize + 4, intFarmSize + 12, (int)BlockType.STONE, 1); // alternating top blocks for (int x = intFarmSize + 4; x <= intFarmSize + 12; x += 2) { for (int z = intFarmSize + 4; z <= intFarmSize + 12; z += 2) { if (x == intFarmSize + 4 || x == intFarmSize + 12 || z == intFarmSize + 4 || z == intFarmSize + 12) { BlockShapes.MakeBlock(x, 82, z, (int)BlockType.STONE, 1); } } } // add central columns BlockShapes.MakeSolidBox(intFarmSize + 8, intFarmSize + 8, 73, 82, intFarmSize + 8, intFarmSize + 8, (int)BlockType.STONE, 1); BlockHelper.MakeLadder(intFarmSize + 7, 73, 82, intFarmSize + 8, 2); BlockHelper.MakeLadder(intFarmSize + 9, 73, 82, intFarmSize + 8, 2); // add torches on the roof BlockShapes.MakeBlock(intFarmSize + 6, 81, intFarmSize + 6, (int)BlockType.TORCH, 1); BlockShapes.MakeBlock(intFarmSize + 6, 81, intFarmSize + 10, (int)BlockType.TORCH, 2); BlockShapes.MakeBlock(intFarmSize + 10, 81, intFarmSize + 10, (int)BlockType.TORCH, 1); // add cobwebs BlockShapes.MakeBlock(intFarmSize + 5, 79, intFarmSize + 5, (int)BlockType.COBWEB, 1, 30); BlockShapes.MakeBlock(intFarmSize + 5, 79, intFarmSize + 11, (int)BlockType.COBWEB, 1, 30); BlockShapes.MakeBlock(intFarmSize + 11, 79, intFarmSize + 5, (int)BlockType.COBWEB, 1, 30); BlockShapes.MakeBlock(intFarmSize + 11, 79, intFarmSize + 11, (int)BlockType.COBWEB, 1, 30); // add chests MakeGuardChest(bm, intFarmSize + 11, 73, intFarmSize + 11); MakeGuardChest(bm, intMapSize - (intFarmSize + 11), 73, intFarmSize + 11); MakeGuardChest(bm, intFarmSize + 11, 73, intMapSize - (intFarmSize + 11)); MakeGuardChest(bm, intMapSize - (intFarmSize + 11), 73, intMapSize - (intFarmSize + 11)); // add archery slots BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 4, 74, 77, intFarmSize + 8, intFarmSize + 8, (int)BlockType.AIR, 2); BlockShapes.MakeSolidBox(intFarmSize + 4, intFarmSize + 4, 76, 76, intFarmSize + 7, intFarmSize + 9, (int)BlockType.AIR, 2); if (!booIncludeWalls) { BlockHelper.MakeLadder(intFarmSize + 13, 64, 72, intFarmSize + 8, 2); } // include beds BlockHelper.MakeBed(intFarmSize + 5, intFarmSize + 6, 64, intFarmSize + 8, intFarmSize + 8, 2); BlockHelper.MakeBed(intFarmSize + 5, intFarmSize + 6, 64, intFarmSize + 10, intFarmSize + 10, 2); BlockHelper.MakeBed(intFarmSize + 11, intFarmSize + 10, 64, intFarmSize + 8, intFarmSize + 8, 2); // make columns to orientate torches BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 5, 64, 73, intFarmSize + 5, intFarmSize + 5, (int)BlockType.WOOD, 2); BlockShapes.MakeSolidBox(intFarmSize + 11, intFarmSize + 11, 64, 71, intFarmSize + 5, intFarmSize + 5, (int)BlockType.WOOD, 2); BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 5, 64, 71, intFarmSize + 11, intFarmSize + 11, (int)BlockType.WOOD, 2); BlockShapes.MakeSolidBox(intFarmSize + 11, intFarmSize + 11, 64, 71, intFarmSize + 11, intFarmSize + 11, (int)BlockType.WOOD, 2); // add ladders BlockHelper.MakeLadder(intFarmSize + 5, 64, 73, intFarmSize + 6, 2, (int)BlockType.WOOD); // make torches BlockHelper.MakeTorch(intFarmSize + 10, 66, intFarmSize + 5, (int)BlockType.WOOD, 2); BlockHelper.MakeTorch(intFarmSize + 6, 66, intFarmSize + 11, (int)BlockType.WOOD, 2); BlockHelper.MakeTorch(intFarmSize + 10, 66, intFarmSize + 11, (int)BlockType.WOOD, 2); // make columns for real BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 5, 64, 73, intFarmSize + 5, intFarmSize + 5, (int)BlockType.STONE, 2); BlockShapes.MakeSolidBox(intFarmSize + 11, intFarmSize + 11, 64, 71, intFarmSize + 5, intFarmSize + 5, (int)BlockType.STONE, 2); BlockShapes.MakeSolidBox(intFarmSize + 5, intFarmSize + 5, 64, 71, intFarmSize + 11, intFarmSize + 11, (int)BlockType.STONE, 2); BlockShapes.MakeSolidBox(intFarmSize + 11, intFarmSize + 11, 64, 71, intFarmSize + 11, intFarmSize + 11, (int)BlockType.STONE, 2); // make cobwebs BlockShapes.MakeBlock(intFarmSize + 11, 67, intFarmSize + 8, (int)BlockType.COBWEB, 2, 75); // make doors from the city to the guard tower BlockShapes.MakeBlock(intFarmSize + 11, 65, intFarmSize + 11, (int)BlockType.GOLD_BLOCK, 1); BlockShapes.MakeBlock(intFarmSize + 11, 64, intFarmSize + 11, (int)BlockType.GOLD_BLOCK, 1); BlockHelper.MakeDoor(intFarmSize + 11, 64, intFarmSize + 12, (int)BlockType.GOLD_BLOCK, true, 2); BlockShapes.MakeBlock(intFarmSize + 11, 65, intFarmSize + 11, (int)BlockType.AIR, 1); BlockShapes.MakeBlock(intFarmSize + 11, 64, intFarmSize + 11, (int)BlockType.AIR, 1); BlockShapes.MakeBlock(intFarmSize + 11, 64, intFarmSize + 11, (int)BlockType.STONE_PLATE, 1); BlockShapes.MakeBlock(intFarmSize + 11, 64, intFarmSize + 13, (int)BlockType.STONE_PLATE, 2); // make beacon if (strFireBeacons == "Yes") { BlockShapes.MakeSolidBox(intFarmSize + 8, intFarmSize + 8, 83, 84, intFarmSize + 8, intFarmSize + 8, (int)BlockType.STONE, 1); BlockShapes.MakeSolidBox(intFarmSize + 6, intFarmSize + 10, 85, 85, intFarmSize + 6, intFarmSize + 10, (int)BlockType.STONE, 1); BlockShapes.MakeSolidBox(intFarmSize + 6, intFarmSize + 10, 86, 86, intFarmSize + 6, intFarmSize + 10, (int)BlockType.NETHERRACK, 1); BlockShapes.MakeSolidBox(intFarmSize + 6, intFarmSize + 10, 87, 87, intFarmSize + 6, intFarmSize + 10, (int)BlockType.FIRE, 1); } }
public static void MakeGuardTowers(BlockManager bm, int intFarmLength, int intMapLength, bool booIncludeWalls, string strOutsideLights, string strTowerAddition, bool booIncludeItemsInChests, int intWallMaterial) { // remove wall BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 11, 64, 79, intFarmLength + 5, intFarmLength + 11, BlockType.AIR, 1); // add tower BlockShapes.MakeHollowBox(intFarmLength + 4, intFarmLength + 12, 63, 80, intFarmLength + 4, intFarmLength + 12, intWallMaterial, 1, -1); // divide into two rooms BlockShapes.MakeSolidBox(intFarmLength + 4, intFarmLength + 12, 2, 72, intFarmLength + 4, intFarmLength + 12, intWallMaterial, 1); BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 11, 64, 67, intFarmLength + 5, intFarmLength + 11, BlockType.AIR, 1); switch (strOutsideLights) { case "Fire": BlockShapes.MakeBlock(intFarmLength + 5, 76, intFarmLength + 3, BlockType.NETHERRACK, 2, 100, -1); BlockShapes.MakeBlock(intFarmLength + 5, 77, intFarmLength + 3, BlockType.FIRE, 2, 100, -1); BlockShapes.MakeBlock(intFarmLength + 11, 76, intFarmLength + 3, BlockType.NETHERRACK, 2, 100, -1); BlockShapes.MakeBlock(intFarmLength + 11, 77, intFarmLength + 3, BlockType.FIRE, 2, 100, -1); break; case "Torches": for (int y = 73; y <= 80; y += 7) { BlockHelper.MakeTorch(intFarmLength + 6, y, intFarmLength + 3, intWallMaterial, 2); BlockHelper.MakeTorch(intFarmLength + 10, y, intFarmLength + 3, intWallMaterial, 2); } break; case "None": break; default: Debug.Fail("Invalid switch result"); break; } // add torches BlockHelper.MakeTorch(intFarmLength + 6, 79, intFarmLength + 13, intWallMaterial, 2); BlockHelper.MakeTorch(intFarmLength + 10, 79, intFarmLength + 13, intWallMaterial, 2); // add torches inside BlockHelper.MakeTorch(intFarmLength + 6, 77, intFarmLength + 11, intWallMaterial, 2); BlockHelper.MakeTorch(intFarmLength + 10, 77, intFarmLength + 11, intWallMaterial, 2); BlockHelper.MakeTorch(intFarmLength + 5, 77, intFarmLength + 6, intWallMaterial, 2); BlockHelper.MakeTorch(intFarmLength + 5, 77, intFarmLength + 10, intWallMaterial, 2); // add openings to the walls BlockShapes.MakeBlock(intFarmLength + 7, 73, intFarmLength + 12, BlockType.AIR, 2, 100, -1); BlockShapes.MakeBlock(intFarmLength + 9, 73, intFarmLength + 12, BlockType.AIR, 2, 100, -1); BlockShapes.MakeBlock(intFarmLength + 7, 74, intFarmLength + 12, BlockType.AIR, 2, 100, -1); BlockShapes.MakeBlock(intFarmLength + 9, 74, intFarmLength + 12, BlockType.AIR, 2, 100, -1); // add blocks on top of the towers BlockShapes.MakeHollowLayers(intFarmLength + 4, intFarmLength + 12, 81, 81, intFarmLength + 4, intFarmLength + 12, intWallMaterial, 1, -1); // alternating top blocks for (int x = intFarmLength + 4; x <= intFarmLength + 12; x += 2) { for (int z = intFarmLength + 4; z <= intFarmLength + 12; z += 2) { if (x == intFarmLength + 4 || x == intFarmLength + 12 || z == intFarmLength + 4 || z == intFarmLength + 12) { BlockShapes.MakeBlock(x, 82, z, intWallMaterial, 1, 100, -1); } } } // add central columns BlockShapes.MakeSolidBox(intFarmLength + 8, intFarmLength + 8, 73, 82, intFarmLength + 8, intFarmLength + 8, intWallMaterial, 1); BlockHelper.MakeLadder(intFarmLength + 7, 73, 82, intFarmLength + 8, 2, intWallMaterial); BlockHelper.MakeLadder(intFarmLength + 9, 73, 82, intFarmLength + 8, 2, intWallMaterial); // add torches on the roof BlockShapes.MakeBlock(intFarmLength + 6, 81, intFarmLength + 6, BlockType.TORCH, 1, 100, -1); BlockShapes.MakeBlock(intFarmLength + 6, 81, intFarmLength + 10, BlockType.TORCH, 2, 100, -1); BlockShapes.MakeBlock(intFarmLength + 10, 81, intFarmLength + 10, BlockType.TORCH, 1, 100, -1); // add cobwebs BlockShapes.MakeBlock(intFarmLength + 5, 79, intFarmLength + 5, BlockType.COBWEB, 1, 30, -1); BlockShapes.MakeBlock(intFarmLength + 5, 79, intFarmLength + 11, BlockType.COBWEB, 1, 30, -1); BlockShapes.MakeBlock(intFarmLength + 11, 79, intFarmLength + 5, BlockType.COBWEB, 1, 30, -1); BlockShapes.MakeBlock(intFarmLength + 11, 79, intFarmLength + 11, BlockType.COBWEB, 1, 30, -1); // add chests MakeGuardChest(bm, intFarmLength + 11, 73, intFarmLength + 11, booIncludeItemsInChests); MakeGuardChest(bm, intMapLength - (intFarmLength + 11), 73, intFarmLength + 11, booIncludeItemsInChests); MakeGuardChest(bm, intFarmLength + 11, 73, intMapLength - (intFarmLength + 11), booIncludeItemsInChests); MakeGuardChest(bm, intMapLength - (intFarmLength + 11), 73, intMapLength - (intFarmLength + 11), booIncludeItemsInChests); // add archery slots BlockShapes.MakeSolidBox(intFarmLength + 4, intFarmLength + 4, 74, 77, intFarmLength + 8, intFarmLength + 8, BlockType.AIR, 2); BlockShapes.MakeSolidBox(intFarmLength + 4, intFarmLength + 4, 76, 76, intFarmLength + 7, intFarmLength + 9, BlockType.AIR, 2); if (!booIncludeWalls) { BlockHelper.MakeLadder(intFarmLength + 13, 64, 72, intFarmLength + 8, 2, intWallMaterial); } // include beds BlockHelper.MakeBed(intFarmLength + 5, intFarmLength + 6, 64, intFarmLength + 8, intFarmLength + 8, 2); BlockHelper.MakeBed(intFarmLength + 5, intFarmLength + 6, 64, intFarmLength + 10, intFarmLength + 10, 2); BlockHelper.MakeBed(intFarmLength + 11, intFarmLength + 10, 64, intFarmLength + 8, intFarmLength + 8, 2); // make columns to orientate torches BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 5, 64, 73, intFarmLength + 5, intFarmLength + 5, BlockType.WOOD, 2); BlockShapes.MakeSolidBox(intFarmLength + 11, intFarmLength + 11, 64, 71, intFarmLength + 5, intFarmLength + 5, BlockType.WOOD, 2); BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 5, 64, 71, intFarmLength + 11, intFarmLength + 11, BlockType.WOOD, 2); BlockShapes.MakeSolidBox(intFarmLength + 11, intFarmLength + 11, 64, 71, intFarmLength + 11, intFarmLength + 11, BlockType.WOOD, 2); // add ladders BlockHelper.MakeLadder(intFarmLength + 5, 64, 73, intFarmLength + 6, 2, BlockType.WOOD); // make torches BlockHelper.MakeTorch(intFarmLength + 10, 66, intFarmLength + 5, BlockType.WOOD, 2); BlockHelper.MakeTorch(intFarmLength + 6, 66, intFarmLength + 11, BlockType.WOOD, 2); BlockHelper.MakeTorch(intFarmLength + 10, 66, intFarmLength + 11, BlockType.WOOD, 2); // make columns for real BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 5, 64, 73, intFarmLength + 5, intFarmLength + 5, intWallMaterial, 2); BlockShapes.MakeSolidBox(intFarmLength + 11, intFarmLength + 11, 64, 71, intFarmLength + 5, intFarmLength + 5, intWallMaterial, 2); BlockShapes.MakeSolidBox(intFarmLength + 5, intFarmLength + 5, 64, 71, intFarmLength + 11, intFarmLength + 11, intWallMaterial, 2); BlockShapes.MakeSolidBox(intFarmLength + 11, intFarmLength + 11, 64, 71, intFarmLength + 11, intFarmLength + 11, intWallMaterial, 2); // make cobwebs BlockShapes.MakeBlock(intFarmLength + 11, 67, intFarmLength + 8, BlockType.COBWEB, 2, 75, -1); // make doors from the city to the guard tower BlockShapes.MakeBlock(intFarmLength + 11, 65, intFarmLength + 11, BlockType.GOLD_BLOCK, 1, 100, -1); BlockShapes.MakeBlock(intFarmLength + 11, 64, intFarmLength + 11, BlockType.GOLD_BLOCK, 1, 100, -1); BlockHelper.MakeDoor(intFarmLength + 11, 64, intFarmLength + 12, BlockType.GOLD_BLOCK, true, 2); BlockShapes.MakeBlock(intFarmLength + 11, 65, intFarmLength + 11, BlockType.AIR, 1, 100, -1); BlockShapes.MakeBlock(intFarmLength + 11, 64, intFarmLength + 11, BlockType.AIR, 1, 100, -1); BlockShapes.MakeBlock(intFarmLength + 11, 64, intFarmLength + 11, BlockType.STONE_PLATE, 1, 100, -1); BlockShapes.MakeBlock(intFarmLength + 11, 64, intFarmLength + 13, BlockType.STONE_PLATE, 2, 100, -1); //BlockShapes.MakeBlock(intFarmLength + 13, 64, intFarmLength + 11, BlockType.STONE_PLATE, 1, 100, -1); // add guard tower sign BlockHelper.MakeSign(intFarmLength + 12, 65, intFarmLength + 13, "~Guard Tower~~", intWallMaterial, 1); BlockHelper.MakeSign(intFarmLength + 8, 74, intFarmLength + 13, "~Guard Tower~~", intWallMaterial, 2); // make beacon switch (strTowerAddition) { case "Fire beacon": BlockShapes.MakeSolidBox(intFarmLength + 8, intFarmLength + 8, 83, 84, intFarmLength + 8, intFarmLength + 8, intWallMaterial, 1); BlockShapes.MakeSolidBox(intFarmLength + 6, intFarmLength + 10, 85, 85, intFarmLength + 6, intFarmLength + 10, intWallMaterial, 1); BlockShapes.MakeSolidBox(intFarmLength + 6, intFarmLength + 10, 86, 86, intFarmLength + 6, intFarmLength + 10, BlockType.NETHERRACK, 1); BlockShapes.MakeSolidBox(intFarmLength + 6, intFarmLength + 10, 87, 87, intFarmLength + 6, intFarmLength + 10, BlockType.FIRE, 1); break; case "Flag": BlockShapes.MakeSolidBox(intFarmLength + 4, intFarmLength + 4, 83, 91, intFarmLength + 12, intFarmLength + 12, BlockType.FENCE, 2); BlockShapes.MakeBlock(intFarmLength + 4, 84, intFarmLength + 13, BlockType.FENCE, 2, 100, 0); BlockShapes.MakeBlock(intFarmLength + 4, 91, intFarmLength + 13, BlockType.FENCE, 2, 100, 0); int[] intColours = Utils.ShuffleArray(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }); switch (RandomHelper.Next(7)) { case 0: //2vert BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 13, intFarmLength + 17, BlockType.WOOL, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 18, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]); break; case 1: //3vert BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 13, intFarmLength + 15, BlockType.WOOL, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 16, intFarmLength + 18, BlockType.WOOL, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 19, intFarmLength + 21, BlockType.WOOL, 2, intColours[2]); break; case 2: //4vert BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 13, intFarmLength + 14, BlockType.WOOL, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 15, intFarmLength + 16, BlockType.WOOL, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 17, intFarmLength + 18, BlockType.WOOL, 2, intColours[2]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 19, intFarmLength + 20, BlockType.WOOL, 2, intColours[3]); break; case 3: //2horiz BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 87, intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 88, 90, intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]); break; case 4: //3horiz BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 86, intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 87, 88, intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 89, 90, intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[2]); break; case 5: //quarters BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 87, intFarmLength + 13, intFarmLength + 17, BlockType.WOOL, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 87, intFarmLength + 18, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 88, 90, intFarmLength + 13, intFarmLength + 17, BlockType.WOOL, 2, intColours[2]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 88, 90, intFarmLength + 18, intFarmLength + 22, BlockType.WOOL, 2, intColours[3]); break; case 6: //cross BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 87, 88, intFarmLength + 13, intFarmLength + 22, BlockType.WOOL, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(intFarmLength + 4, intFarmLength + 4, 85, 90, intFarmLength + 17, intFarmLength + 18, BlockType.WOOL, 2, intColours[1]); break; default: Debug.Fail("Invalid switch result"); break; } break; } }
public static void MakeGuardTowers(BlockManager bm, frmMace frmLogForm) { // remove wall BlockShapes.MakeSolidBox(City.EdgeLength + 5, City.EdgeLength + 11, 64, 79, City.EdgeLength + 5, City.EdgeLength + 11, BlockInfo.Air.ID, 1); // add tower BlockShapes.MakeHollowBox(City.EdgeLength + 4, City.EdgeLength + 12, 63, 80, City.EdgeLength + 4, City.EdgeLength + 12, City.WallMaterialID, 1, City.WallMaterialData); // divide into two rooms BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 4, City.EdgeLength + 12, 2, 72, City.EdgeLength + 4, City.EdgeLength + 12, City.WallMaterialID, 1, City.WallMaterialData); BlockShapes.MakeSolidBox(City.EdgeLength + 5, City.EdgeLength + 11, 64, 67, City.EdgeLength + 5, City.EdgeLength + 11, BlockInfo.Air.ID, 1); switch (City.OutsideLightType) { case "Fire": BlockShapes.MakeBlock(City.EdgeLength + 5, 76, City.EdgeLength + 3, BlockInfo.Netherrack.ID, 2, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 5, 77, City.EdgeLength + 3, BlockInfo.Fire.ID, 2, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 11, 76, City.EdgeLength + 3, BlockInfo.Netherrack.ID, 2, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 11, 77, City.EdgeLength + 3, BlockInfo.Fire.ID, 2, 100, -1); break; case "Torches": for (int y = 73; y <= 80; y += 7) { BlockHelper.MakeTorch(City.EdgeLength + 6, y, City.EdgeLength + 3, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.EdgeLength + 10, y, City.EdgeLength + 3, City.WallMaterialID, 2); } break; case "None": case "": break; default: Debug.Fail("Invalid switch result"); break; } if (City.HasTorchesOnWalkways) { // add torches BlockHelper.MakeTorch(City.EdgeLength + 6, 79, City.EdgeLength + 13, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.EdgeLength + 10, 79, City.EdgeLength + 13, City.WallMaterialID, 2); // add torches inside BlockHelper.MakeTorch(City.EdgeLength + 6, 77, City.EdgeLength + 11, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.EdgeLength + 10, 77, City.EdgeLength + 11, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.EdgeLength + 5, 77, City.EdgeLength + 6, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.EdgeLength + 5, 77, City.EdgeLength + 10, City.WallMaterialID, 2); } // add openings to the walls BlockShapes.MakeBlock(City.EdgeLength + 7, 73, City.EdgeLength + 12, BlockInfo.Air.ID, 2, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 9, 73, City.EdgeLength + 12, BlockInfo.Air.ID, 2, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 7, 74, City.EdgeLength + 12, BlockInfo.Air.ID, 2, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 9, 74, City.EdgeLength + 12, BlockInfo.Air.ID, 2, 100, -1); // add blocks on top of the towers BlockShapes.MakeHollowLayers(City.EdgeLength + 4, City.EdgeLength + 12, 81, 81, City.EdgeLength + 4, City.EdgeLength + 12, City.WallMaterialID, 1, City.WallMaterialData); // alternating top blocks for (int x = City.EdgeLength + 4; x <= City.EdgeLength + 12; x += 2) { for (int z = City.EdgeLength + 4; z <= City.EdgeLength + 12; z += 2) { if (x == City.EdgeLength + 4 || x == City.EdgeLength + 12 || z == City.EdgeLength + 4 || z == City.EdgeLength + 12) { BlockShapes.MakeBlock(x, 82, z, City.WallMaterialID, 1, 100, City.WallMaterialData); } } } // add central columns BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 8, City.EdgeLength + 8, 73, 82, City.EdgeLength + 8, City.EdgeLength + 8, City.WallMaterialID, 1, City.WallMaterialData); BlockHelper.MakeLadder(City.EdgeLength + 7, 73, 82, City.EdgeLength + 8, 2, City.WallMaterialID); BlockHelper.MakeLadder(City.EdgeLength + 9, 73, 82, City.EdgeLength + 8, 2, City.WallMaterialID); // add torches on the roof if (City.HasTorchesOnWalkways) { BlockShapes.MakeBlock(City.EdgeLength + 6, 81, City.EdgeLength + 6, BlockInfo.Torch.ID, 1, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 6, 81, City.EdgeLength + 10, BlockInfo.Torch.ID, 2, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 10, 81, City.EdgeLength + 10, BlockInfo.Torch.ID, 1, 100, -1); } // add cobwebs BlockShapes.MakeBlock(City.EdgeLength + 5, 79, City.EdgeLength + 5, BlockInfo.Cobweb.ID, 1, 30, -1); BlockShapes.MakeBlock(City.EdgeLength + 5, 79, City.EdgeLength + 11, BlockInfo.Cobweb.ID, 1, 30, -1); BlockShapes.MakeBlock(City.EdgeLength + 11, 79, City.EdgeLength + 5, BlockInfo.Cobweb.ID, 1, 30, -1); BlockShapes.MakeBlock(City.EdgeLength + 11, 79, City.EdgeLength + 11, BlockInfo.Cobweb.ID, 1, 30, -1); // add chests MakeGuardChest(bm, City.EdgeLength + 11, 73, City.EdgeLength + 11); MakeGuardChest(bm, City.MapLength - (City.EdgeLength + 11), 73, City.EdgeLength + 11); MakeGuardChest(bm, City.EdgeLength + 11, 73, City.MapLength - (City.EdgeLength + 11)); MakeGuardChest(bm, City.MapLength - (City.EdgeLength + 11), 73, City.MapLength - (City.EdgeLength + 11)); // add archery slots BlockShapes.MakeSolidBox(City.EdgeLength + 4, City.EdgeLength + 4, 74, 77, City.EdgeLength + 8, City.EdgeLength + 8, BlockInfo.Air.ID, 2); BlockShapes.MakeSolidBox(City.EdgeLength + 4, City.EdgeLength + 4, 76, 76, City.EdgeLength + 7, City.EdgeLength + 9, BlockInfo.Air.ID, 2); if (!City.HasWalls) { BlockHelper.MakeLadder(City.EdgeLength + 13, 64, 72, City.EdgeLength + 8, 2, City.WallMaterialID); } // include beds BlockHelper.MakeBed(City.EdgeLength + 5, City.EdgeLength + 6, 64, City.EdgeLength + 8, City.EdgeLength + 8, 2); BlockHelper.MakeBed(City.EdgeLength + 5, City.EdgeLength + 6, 64, City.EdgeLength + 10, City.EdgeLength + 10, 2); BlockHelper.MakeBed(City.EdgeLength + 11, City.EdgeLength + 10, 64, City.EdgeLength + 8, City.EdgeLength + 8, 2); // make columns to orientate torches BlockShapes.MakeSolidBox(City.EdgeLength + 5, City.EdgeLength + 5, 64, 73, City.EdgeLength + 5, City.EdgeLength + 5, BlockInfo.Wood.ID, 2); BlockShapes.MakeSolidBox(City.EdgeLength + 11, City.EdgeLength + 11, 64, 71, City.EdgeLength + 5, City.EdgeLength + 5, BlockInfo.Wood.ID, 2); BlockShapes.MakeSolidBox(City.EdgeLength + 5, City.EdgeLength + 5, 64, 71, City.EdgeLength + 11, City.EdgeLength + 11, BlockInfo.Wood.ID, 2); BlockShapes.MakeSolidBox(City.EdgeLength + 11, City.EdgeLength + 11, 64, 71, City.EdgeLength + 11, City.EdgeLength + 11, BlockInfo.Wood.ID, 2); // add ladders BlockHelper.MakeLadder(City.EdgeLength + 5, 64, 73, City.EdgeLength + 6, 2, BlockInfo.Wood.ID); // make torches if (City.HasTorchesOnWalkways) { BlockHelper.MakeTorch(City.EdgeLength + 10, 66, City.EdgeLength + 5, BlockInfo.Wood.ID, 2); BlockHelper.MakeTorch(City.EdgeLength + 6, 66, City.EdgeLength + 11, BlockInfo.Wood.ID, 2); BlockHelper.MakeTorch(City.EdgeLength + 10, 66, City.EdgeLength + 11, BlockInfo.Wood.ID, 2); } // make columns for real BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 5, City.EdgeLength + 5, 64, 73, City.EdgeLength + 5, City.EdgeLength + 5, City.WallMaterialID, 2, City.WallMaterialData); BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 11, City.EdgeLength + 11, 64, 71, City.EdgeLength + 5, City.EdgeLength + 5, City.WallMaterialID, 2, City.WallMaterialData); BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 5, City.EdgeLength + 5, 64, 71, City.EdgeLength + 11, City.EdgeLength + 11, City.WallMaterialID, 2, City.WallMaterialData); BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 11, City.EdgeLength + 11, 64, 71, City.EdgeLength + 11, City.EdgeLength + 11, City.WallMaterialID, 2, City.WallMaterialData); // make cobwebs BlockShapes.MakeBlock(City.EdgeLength + 11, 67, City.EdgeLength + 8, BlockInfo.Cobweb.ID, 2, 75, -1); // make doors from the city to the guard tower BlockShapes.MakeBlock(City.EdgeLength + 11, 65, City.EdgeLength + 11, BlockInfo.GoldBlock.ID, 1, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 11, 64, City.EdgeLength + 11, BlockInfo.GoldBlock.ID, 1, 100, -1); BlockHelper.MakeDoor(City.EdgeLength + 11, 64, City.EdgeLength + 12, BlockInfo.GoldBlock.ID, true, 2); BlockShapes.MakeBlock(City.EdgeLength + 11, 65, City.EdgeLength + 11, BlockInfo.Air.ID, 1, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 11, 64, City.EdgeLength + 11, BlockInfo.Air.ID, 1, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 11, 64, City.EdgeLength + 11, BlockInfo.StonePlate.ID, 1, 100, -1); BlockShapes.MakeBlock(City.EdgeLength + 11, 64, City.EdgeLength + 13, BlockInfo.StonePlate.ID, 2, 100, -1); //BlockShapes.MakeBlock(City.intFarmSize + 13, 64, City.intFarmSize + 11, BlockInfo.Stone.ID_PLATE, 1, 100, -1); // add guard tower sign BlockHelper.MakeSign(City.EdgeLength + 12, 65, City.EdgeLength + 13, "~Guard Tower~~", City.WallMaterialID, 1); BlockHelper.MakeSign(City.EdgeLength + 8, 74, City.EdgeLength + 13, "~Guard Tower~~", City.WallMaterialID, 2); // make beacon frmLogForm.UpdateLog("Creating tower addition: " + City.TowersAdditionType, true, true); switch (City.TowersAdditionType) { case "Fire beacon": BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 8, City.EdgeLength + 8, 83, 84, City.EdgeLength + 8, City.EdgeLength + 8, City.WallMaterialID, 1, City.WallMaterialData); BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 6, City.EdgeLength + 10, 85, 85, City.EdgeLength + 6, City.EdgeLength + 10, City.WallMaterialID, 1, City.WallMaterialData); BlockShapes.MakeSolidBox(City.EdgeLength + 6, City.EdgeLength + 10, 86, 86, City.EdgeLength + 6, City.EdgeLength + 10, BlockInfo.Netherrack.ID, 1); BlockShapes.MakeSolidBox(City.EdgeLength + 6, City.EdgeLength + 10, 87, 87, City.EdgeLength + 6, City.EdgeLength + 10, BlockInfo.Fire.ID, 1); break; case "Flag": BlockShapes.MakeSolidBox(City.EdgeLength + 4, City.EdgeLength + 4, 83, 91, City.EdgeLength + 12, City.EdgeLength + 12, BlockInfo.Fence.ID, 2); BlockShapes.MakeBlock(City.EdgeLength + 4, 84, City.EdgeLength + 13, BlockInfo.Fence.ID, 2, 100, 0); BlockShapes.MakeBlock(City.EdgeLength + 4, 91, City.EdgeLength + 13, BlockInfo.Fence.ID, 2, 100, 0); int[] intColours = RNG.ShuffleArray(Enumerable.Range(0, 15).ToArray()); // select a random flag file and turn it into an array string[] strFlagLines = File.ReadAllLines(RNG.RandomItemFromArray(Directory.GetFiles("Resources", "Flag_*.txt"))); for (int x = 0; x < strFlagLines[0].Length; x++) { for (int y = 0; y < strFlagLines.GetLength(0); y++) { int WoolColourID = Convert.ToInt32(strFlagLines[y].Substring(x, 1)); BlockShapes.MakeSolidBoxWithData(City.EdgeLength + 4, City.EdgeLength + 4, 90 - y, 90 - y, City.EdgeLength + 13 + x, City.EdgeLength + 13 + x, BlockInfo.Wool.ID, 2, intColours[WoolColourID]); } } break; } }
public static void MakeGuardTowers(BlockManager bm, frmMace frmLogForm) { // remove wall BlockShapes.MakeSolidBox(City.FarmLength + 5, City.FarmLength + 11, 64, 79, City.FarmLength + 5, City.FarmLength + 11, BlockInfo.Air.ID, 1); // add tower BlockShapes.MakeHollowBox(City.FarmLength + 4, City.FarmLength + 12, 63, 80, City.FarmLength + 4, City.FarmLength + 12, City.WallMaterialID, 1, City.WallMaterialData); // divide into two rooms BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 12, 2, 72, City.FarmLength + 4, City.FarmLength + 12, City.WallMaterialID, 1, City.WallMaterialData); BlockShapes.MakeSolidBox(City.FarmLength + 5, City.FarmLength + 11, 64, 67, City.FarmLength + 5, City.FarmLength + 11, BlockInfo.Air.ID, 1); switch (City.OutsideLightType) { case "Fire": BlockShapes.MakeBlock(City.FarmLength + 5, 76, City.FarmLength + 3, BlockInfo.Netherrack.ID, 2, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 5, 77, City.FarmLength + 3, BlockInfo.Fire.ID, 2, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 11, 76, City.FarmLength + 3, BlockInfo.Netherrack.ID, 2, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 11, 77, City.FarmLength + 3, BlockInfo.Fire.ID, 2, 100, -1); break; case "Torches": for (int y = 73; y <= 80; y += 7) { BlockHelper.MakeTorch(City.FarmLength + 6, y, City.FarmLength + 3, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.FarmLength + 10, y, City.FarmLength + 3, City.WallMaterialID, 2); } break; case "None": break; default: Debug.Fail("Invalid switch result"); break; } // add torches BlockHelper.MakeTorch(City.FarmLength + 6, 79, City.FarmLength + 13, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.FarmLength + 10, 79, City.FarmLength + 13, City.WallMaterialID, 2); // add torches inside BlockHelper.MakeTorch(City.FarmLength + 6, 77, City.FarmLength + 11, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.FarmLength + 10, 77, City.FarmLength + 11, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.FarmLength + 5, 77, City.FarmLength + 6, City.WallMaterialID, 2); BlockHelper.MakeTorch(City.FarmLength + 5, 77, City.FarmLength + 10, City.WallMaterialID, 2); // add openings to the walls BlockShapes.MakeBlock(City.FarmLength + 7, 73, City.FarmLength + 12, BlockInfo.Air.ID, 2, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 9, 73, City.FarmLength + 12, BlockInfo.Air.ID, 2, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 7, 74, City.FarmLength + 12, BlockInfo.Air.ID, 2, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 9, 74, City.FarmLength + 12, BlockInfo.Air.ID, 2, 100, -1); // add blocks on top of the towers BlockShapes.MakeHollowLayers(City.FarmLength + 4, City.FarmLength + 12, 81, 81, City.FarmLength + 4, City.FarmLength + 12, City.WallMaterialID, 1, City.WallMaterialData); // alternating top blocks for (int x = City.FarmLength + 4; x <= City.FarmLength + 12; x += 2) { for (int z = City.FarmLength + 4; z <= City.FarmLength + 12; z += 2) { if (x == City.FarmLength + 4 || x == City.FarmLength + 12 || z == City.FarmLength + 4 || z == City.FarmLength + 12) { BlockShapes.MakeBlock(x, 82, z, City.WallMaterialID, 1, 100, City.WallMaterialData); } } } // add central columns BlockShapes.MakeSolidBoxWithData(City.FarmLength + 8, City.FarmLength + 8, 73, 82, City.FarmLength + 8, City.FarmLength + 8, City.WallMaterialID, 1, City.WallMaterialData); BlockHelper.MakeLadder(City.FarmLength + 7, 73, 82, City.FarmLength + 8, 2, City.WallMaterialID); BlockHelper.MakeLadder(City.FarmLength + 9, 73, 82, City.FarmLength + 8, 2, City.WallMaterialID); // add torches on the roof BlockShapes.MakeBlock(City.FarmLength + 6, 81, City.FarmLength + 6, BlockInfo.Torch.ID, 1, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 6, 81, City.FarmLength + 10, BlockInfo.Torch.ID, 2, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 10, 81, City.FarmLength + 10, BlockInfo.Torch.ID, 1, 100, -1); // add cobwebs BlockShapes.MakeBlock(City.FarmLength + 5, 79, City.FarmLength + 5, BlockInfo.Cobweb.ID, 1, 30, -1); BlockShapes.MakeBlock(City.FarmLength + 5, 79, City.FarmLength + 11, BlockInfo.Cobweb.ID, 1, 30, -1); BlockShapes.MakeBlock(City.FarmLength + 11, 79, City.FarmLength + 5, BlockInfo.Cobweb.ID, 1, 30, -1); BlockShapes.MakeBlock(City.FarmLength + 11, 79, City.FarmLength + 11, BlockInfo.Cobweb.ID, 1, 30, -1); // add chests MakeGuardChest(bm, City.FarmLength + 11, 73, City.FarmLength + 11); MakeGuardChest(bm, City.MapLength - (City.FarmLength + 11), 73, City.FarmLength + 11); MakeGuardChest(bm, City.FarmLength + 11, 73, City.MapLength - (City.FarmLength + 11)); MakeGuardChest(bm, City.MapLength - (City.FarmLength + 11), 73, City.MapLength - (City.FarmLength + 11)); // add archery slots BlockShapes.MakeSolidBox(City.FarmLength + 4, City.FarmLength + 4, 74, 77, City.FarmLength + 8, City.FarmLength + 8, BlockInfo.Air.ID, 2); BlockShapes.MakeSolidBox(City.FarmLength + 4, City.FarmLength + 4, 76, 76, City.FarmLength + 7, City.FarmLength + 9, BlockInfo.Air.ID, 2); if (!City.HasWalls) { BlockHelper.MakeLadder(City.FarmLength + 13, 64, 72, City.FarmLength + 8, 2, City.WallMaterialID); } // include beds BlockHelper.MakeBed(City.FarmLength + 5, City.FarmLength + 6, 64, City.FarmLength + 8, City.FarmLength + 8, 2); BlockHelper.MakeBed(City.FarmLength + 5, City.FarmLength + 6, 64, City.FarmLength + 10, City.FarmLength + 10, 2); BlockHelper.MakeBed(City.FarmLength + 11, City.FarmLength + 10, 64, City.FarmLength + 8, City.FarmLength + 8, 2); // make columns to orientate torches BlockShapes.MakeSolidBox(City.FarmLength + 5, City.FarmLength + 5, 64, 73, City.FarmLength + 5, City.FarmLength + 5, BlockInfo.Wood.ID, 2); BlockShapes.MakeSolidBox(City.FarmLength + 11, City.FarmLength + 11, 64, 71, City.FarmLength + 5, City.FarmLength + 5, BlockInfo.Wood.ID, 2); BlockShapes.MakeSolidBox(City.FarmLength + 5, City.FarmLength + 5, 64, 71, City.FarmLength + 11, City.FarmLength + 11, BlockInfo.Wood.ID, 2); BlockShapes.MakeSolidBox(City.FarmLength + 11, City.FarmLength + 11, 64, 71, City.FarmLength + 11, City.FarmLength + 11, BlockInfo.Wood.ID, 2); // add ladders BlockHelper.MakeLadder(City.FarmLength + 5, 64, 73, City.FarmLength + 6, 2, BlockInfo.Wood.ID); // make torches BlockHelper.MakeTorch(City.FarmLength + 10, 66, City.FarmLength + 5, BlockInfo.Wood.ID, 2); BlockHelper.MakeTorch(City.FarmLength + 6, 66, City.FarmLength + 11, BlockInfo.Wood.ID, 2); BlockHelper.MakeTorch(City.FarmLength + 10, 66, City.FarmLength + 11, BlockInfo.Wood.ID, 2); // make columns for real BlockShapes.MakeSolidBoxWithData(City.FarmLength + 5, City.FarmLength + 5, 64, 73, City.FarmLength + 5, City.FarmLength + 5, City.WallMaterialID, 2, City.WallMaterialData); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 11, City.FarmLength + 11, 64, 71, City.FarmLength + 5, City.FarmLength + 5, City.WallMaterialID, 2, City.WallMaterialData); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 5, City.FarmLength + 5, 64, 71, City.FarmLength + 11, City.FarmLength + 11, City.WallMaterialID, 2, City.WallMaterialData); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 11, City.FarmLength + 11, 64, 71, City.FarmLength + 11, City.FarmLength + 11, City.WallMaterialID, 2, City.WallMaterialData); // make cobwebs BlockShapes.MakeBlock(City.FarmLength + 11, 67, City.FarmLength + 8, BlockInfo.Cobweb.ID, 2, 75, -1); // make doors from the city to the guard tower BlockShapes.MakeBlock(City.FarmLength + 11, 65, City.FarmLength + 11, BlockInfo.GoldBlock.ID, 1, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 11, 64, City.FarmLength + 11, BlockInfo.GoldBlock.ID, 1, 100, -1); BlockHelper.MakeDoor(City.FarmLength + 11, 64, City.FarmLength + 12, BlockInfo.GoldBlock.ID, true, 2); BlockShapes.MakeBlock(City.FarmLength + 11, 65, City.FarmLength + 11, BlockInfo.Air.ID, 1, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 11, 64, City.FarmLength + 11, BlockInfo.Air.ID, 1, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 11, 64, City.FarmLength + 11, BlockInfo.StonePlate.ID, 1, 100, -1); BlockShapes.MakeBlock(City.FarmLength + 11, 64, City.FarmLength + 13, BlockInfo.StonePlate.ID, 2, 100, -1); //BlockShapes.MakeBlock(City.intFarmSize + 13, 64, City.intFarmSize + 11, BlockInfo.Stone.ID_PLATE, 1, 100, -1); // add guard tower sign BlockHelper.MakeSign(City.FarmLength + 12, 65, City.FarmLength + 13, "~Guard Tower~~", City.WallMaterialID, 1); BlockHelper.MakeSign(City.FarmLength + 8, 74, City.FarmLength + 13, "~Guard Tower~~", City.WallMaterialID, 2); // make beacon frmLogForm.UpdateLog("Creating tower addition: " + City.TowersAdditionType, true, true); switch (City.TowersAdditionType) { case "Fire beacon": BlockShapes.MakeSolidBoxWithData(City.FarmLength + 8, City.FarmLength + 8, 83, 84, City.FarmLength + 8, City.FarmLength + 8, City.WallMaterialID, 1, City.WallMaterialData); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 6, City.FarmLength + 10, 85, 85, City.FarmLength + 6, City.FarmLength + 10, City.WallMaterialID, 1, City.WallMaterialData); BlockShapes.MakeSolidBox(City.FarmLength + 6, City.FarmLength + 10, 86, 86, City.FarmLength + 6, City.FarmLength + 10, BlockInfo.Netherrack.ID, 1); BlockShapes.MakeSolidBox(City.FarmLength + 6, City.FarmLength + 10, 87, 87, City.FarmLength + 6, City.FarmLength + 10, BlockInfo.Fire.ID, 1); break; case "Flag": BlockShapes.MakeSolidBox(City.FarmLength + 4, City.FarmLength + 4, 83, 91, City.FarmLength + 12, City.FarmLength + 12, BlockInfo.Fence.ID, 2); BlockShapes.MakeBlock(City.FarmLength + 4, 84, City.FarmLength + 13, BlockInfo.Fence.ID, 2, 100, 0); BlockShapes.MakeBlock(City.FarmLength + 4, 91, City.FarmLength + 13, BlockInfo.Fence.ID, 2, 100, 0); int[] intColours = RandomHelper.ShuffleArray(Enumerable.Range(0, 15).ToArray()); switch (RandomHelper.Next(8)) { case 0: //2vert BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 13, City.FarmLength + 17, BlockInfo.Wool.ID, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 18, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]); break; case 1: //3vert BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 13, City.FarmLength + 15, BlockInfo.Wool.ID, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 16, City.FarmLength + 18, BlockInfo.Wool.ID, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 19, City.FarmLength + 21, BlockInfo.Wool.ID, 2, intColours[2]); break; case 2: //4vert BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 13, City.FarmLength + 14, BlockInfo.Wool.ID, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 15, City.FarmLength + 16, BlockInfo.Wool.ID, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 17, City.FarmLength + 18, BlockInfo.Wool.ID, 2, intColours[2]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 19, City.FarmLength + 20, BlockInfo.Wool.ID, 2, intColours[3]); break; case 3: //2horiz BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 87, City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 88, 90, City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]); break; case 4: //3horiz BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 86, City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 87, 88, City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 89, 90, City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[2]); break; case 5: //quarters BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 87, City.FarmLength + 13, City.FarmLength + 17, BlockInfo.Wool.ID, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 87, City.FarmLength + 18, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 88, 90, City.FarmLength + 13, City.FarmLength + 17, BlockInfo.Wool.ID, 2, intColours[2]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 88, 90, City.FarmLength + 18, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[3]); break; case 6: //cross BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 87, 88, City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 17, City.FarmLength + 18, BlockInfo.Wool.ID, 2, intColours[1]); break; default: // inside "circle" BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 85, 90, City.FarmLength + 13, City.FarmLength + 22, BlockInfo.Wool.ID, 2, intColours[0]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 86, 89, City.FarmLength + 17, City.FarmLength + 18, BlockInfo.Wool.ID, 2, intColours[1]); BlockShapes.MakeSolidBoxWithData(City.FarmLength + 4, City.FarmLength + 4, 87, 88, City.FarmLength + 16, City.FarmLength + 19, BlockInfo.Wool.ID, 2, intColours[1]); break; } break; } }