public static void MakeDoor(int x, int y, int z, int intBlockAgainst, bool booIronDoor, int intMirror) { int intDirection = BlockHelper.DoorDirection(x, y + 1, z, intBlockAgainst); int intBlockType = BlockInfo.WoodDoor.ID; if (booIronDoor) { intBlockType = BlockInfo.IronDoor.ID; } BlockShapes.MakeBlock(x, y + 1, z, intBlockType, (int)DoorState.TOPHALF + intDirection); BlockShapes.MakeBlock(x, y, z, intBlockType, intDirection); if (intMirror > 0) { MakeDoor(City.MapLength - x, y, z, intBlockAgainst, booIronDoor, 0); MakeDoor(x, y, City.MapLength - z, intBlockAgainst, booIronDoor, 0); MakeDoor(City.MapLength - x, y, City.MapLength - z, intBlockAgainst, booIronDoor, 0); if (intMirror == 2) { MakeDoor(z, y, x, intBlockAgainst, booIronDoor, 1); } } }
public static void MakeDoor(int x, int y, int z, int intBlockAgainst, bool booIronDoor, int intMirror) { int intDirection = BlockHelper.DoorDirection(x, y + 1, z, intBlockAgainst); int intBlockType = BlockType.WOOD_DOOR; if (booIronDoor) { intBlockType = BlockType.IRON_DOOR; } BlockShapes.MakeBlock(x, y + 1, z, intBlockType, (int)DoorState.TOPHALF + intDirection); BlockShapes.MakeBlock(x, y, z, intBlockType, intDirection); if (intMirror > 0) { MakeDoor(_intMapSize - x, y, z, intBlockAgainst, booIronDoor, 0); MakeDoor(x, y, _intMapSize - z, intBlockAgainst, booIronDoor, 0); MakeDoor(_intMapSize - x, y, _intMapSize - z, intBlockAgainst, booIronDoor, 0); if (intMirror == 2) { MakeDoor(z, y, x, intBlockAgainst, booIronDoor, 1); } } }