def _add_windows(self): builds = [] builds.append( BuildingBlock( GroundRoomBase.WALLS_CORNER_POS['North East'] + Vec3(-1, 1, 0), block.GLASS_PANE, GroundRoomBase.WALLS_CORNER_POS['North East'] + Vec3(-1, 2, 0), description="window")) builds.append( BuildingBlock( GroundRoomBase.WALLS_CORNER_POS['North East'] + Vec3(-3, 1, 0), block.GLASS_PANE, GroundRoomBase.WALLS_CORNER_POS['North East'] + Vec3(-4, 2, 0), description="window")) builds.append( BuildingBlock( GroundRoomBase.WALLS_CORNER_POS['North East'] + Vec3(-6, 1, 0), block.GLASS_PANE, GroundRoomBase.WALLS_CORNER_POS['North East'] + Vec3(-6, 2, 0), description="window")) builds.append( Torch( GroundRoomBase.WALLS_CORNER_POS['North East'] + Vec3(-2, 2, 1), block.TORCH.withData(Torch.SOUTH))) builds.append( Torch( GroundRoomBase.WALLS_CORNER_POS['North West'] + Vec3(2, 2, 1), block.TORCH.withData(Torch.SOUTH))) self._add_section("Base room windows", builds)
def _clear_wall_walkway(self): builds = [] builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-7), WALL_HEIGHT, -2), block.AIR, self.column_se_corner + Vec3(self._get_x(-4), WALL_HEIGHT + 2, -3), description="clear corner turret wall walkway")) builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-5), WALL_HEIGHT, -3), block.AIR, self.column_se_corner + Vec3(self._get_x(-4), WALL_HEIGHT + 2, 0), description="clear corner turret wall walkway")) builds.append( Torch(self.column_se_corner + Vec3(self._get_x(-6), WALL_HEIGHT + 2, -2), block.TORCH.withData(Torch.NORTH), description="walkway torch")) torch_orientation = Torch.EAST if self.mirrored: torch_orientation = Torch.WEST builds.append( Torch(self.column_se_corner + Vec3(self._get_x(-5), WALL_HEIGHT + 2, -1), block.TORCH.withData(torch_orientation), description="walkway torch")) self._add_section("Turret - clear wall walkway", builds)
def _create_ground_floor_fittings(self): # TODO: add class for main doorway # add windows & torches builds = [] builds.append(SubBuilding(TurretTaper(Building.NORTH), Castle.WALLS_CORNER_POS['North West'] + Vec3(3,0,3))) builds.append(SubBuilding(TurretTaper(Building.EAST), Castle.WALLS_CORNER_POS['North East'] + Vec3(-3,0,3))) builds.append(SubBuilding(TurretTaper(Building.SOUTH), Castle.WALLS_CORNER_POS['South East'] + Vec3(-3,0,-3))) builds.append(SubBuilding(TurretTaper(Building.WEST), Castle.WALLS_CORNER_POS['South West'] + Vec3(3,0,-3))) self._add_section("Turret bases", builds) # torches over external side doors builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-1,2,-15), block.TORCH.withData(Torch.WEST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-26,2,-15), block.TORCH.withData(Torch.EAST))) # torches a foyer end of corridors builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-8,2,-15), block.TORCH.withData(Torch.SOUTH))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-19,2,-15), block.TORCH.withData(Torch.SOUTH))) # torches on walls of kitchen & enchanting room builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-8,2,-10), block.TORCH.withData(Torch.WEST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-19,2,-9), block.TORCH.withData(Torch.EAST))) # torches on walls of Pantry & smithy builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-8,2,-5), block.TORCH.withData(Torch.WEST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-19,2,-5), block.TORCH.withData(Torch.EAST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-8,2,-2), block.TORCH.withData(Torch.WEST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-19,2,-2), block.TORCH.withData(Torch.EAST))) self._add_section("Ground floor torches", builds) builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(-9,1,0), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(-10,2,0), description="window")) builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(-17,1,0), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(-18,2,0), description="window")) self._add_section("Ground floor Windows", builds)
def __init__(self, *args, **kwargs): super(LampPost, self).__init__(width=LampPost.WIDTH, *args, **kwargs) post = BuildingBlock(Building.SE_CORNER_POS + Vec3(-1, 0, -1), block.FENCE, description="Post") self.add_layer(BuildingLayer([post], 0)) self.add_layer(BuildingLayer([post], 1)) self.add_layer(BuildingLayer([post], 2)) torches = [(Building.SE_CORNER_POS + Vec3(-2, 0, -1), block.TORCH.withData(Torch.WEST), "West torch"), (Building.SE_CORNER_POS + Vec3(-1, 0, -2), block.TORCH.withData(Torch.NORTH), "North torch"), (Building.SE_CORNER_POS + Vec3(0, 0, -1), block.TORCH.withData(Torch.EAST), "East torch"), (Building.SE_CORNER_POS + Vec3(-1, 0, 0), block.TORCH.withData(Torch.SOUTH), "South torch")] wool_block = block.WOOL.withData(LampPost.BLACK_WOOL) lamp_blocks = [] lamp_blocks.append( BuildingBlock(Building.SE_CORNER_POS + Vec3(-1, 0, -1), wool_block, description="Lamp block")) for pos, block_type, desc in torches: lamp_blocks.append(Torch(pos, block_type, description=desc)) self.add_layer(BuildingLayer(lamp_blocks, 3)) self._set_orientation()
def _create_turret_access(self): builds = [] builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-6), -2, 0), block.STONE_BRICK, self.column_se_corner + Vec3(self._get_x(-7), 3, -1), description="turret access point")) builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-4), 0, -1), block.AIR, self.column_se_corner + Vec3(self._get_x(-6), 2, -1), description="turret acces clearance")) builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-4), 0, -2), block.AIR, self.column_se_corner + Vec3(self._get_x(-4), 2, -2), description="turret acces clearance")) hinge_type = Door.HINGE_RIGHT door_orientation = Door.WEST inside_torch = Torch.EAST outside_torch = Torch.WEST if self.mirrored: hinge_type = Door.HINGE_LEFT door_orientation = Door.EAST inside_torch = Torch.WEST outside_torch = Torch.EAST builds.append( Door(hinge_type, self.column_se_corner + Vec3(self._get_x(-7), 0, -1), block.DOOR_WOOD.withData(door_orientation), description="Turret access door")) builds.append( Torch(self.column_se_corner + Vec3(-6, 2, -1), block.TORCH.withData(inside_torch), description="main column torch")) builds.append( Torch(self.column_se_corner + Vec3(-8, 2, -1), block.TORCH.withData(outside_torch), description="main column torch")) self._add_section("Corner Turret access", builds)
def _create_structure(self): super(Fireplace, self)._create_structure() # create walls builds = [] builds.append( BuildingBlock(Fireplace.AREA_SPAN[0], block.STONE_BRICK, Fireplace.AREA_SPAN[1], description="Stone fill")) builds.append( BuildingBlock(Fireplace.OPEN_FRONT_SPAN[0], block.AIR, Fireplace.OPEN_FRONT_SPAN[1], description="Clear Front")) builds.append( BuildingBlock(Fireplace.GRATE_SPAN[0], block.AIR, Fireplace.GRATE_SPAN[1], description="Clear grate")) builds.append( BuildingBlock(Fireplace.GRILL_SPAN[0], Fireplace.GRILL_TYPE, Fireplace.GRILL_SPAN[1], description="Stone fill")) builds.append( BuildingBlock(Fireplace.LAVAL_SPAN[0], block.LAVA, Fireplace.LAVAL_SPAN[1], description="Stone fill")) builds.append( Torch(Fireplace.TORCH_POS[0], block.TORCH.withData(Torch.SOUTH), description="torch")) builds.append( Torch(Fireplace.TORCH_POS[1], block.TORCH.withData(Torch.SOUTH), description="torch")) self._add_section("Fireplace", builds)
def _add_torches(self): builds = [] heights = [3, WALL_HEIGHT + 3] for height in heights: builds.append( Torch(self.column_se_corner + Vec3(-8, height, -4), block.TORCH.withData(Torch.WEST), description="main column torch")) builds.append( Torch(self.column_se_corner + Vec3(-4, height, -8), block.TORCH.withData(Torch.NORTH), description="main column torch")) builds.append( Torch(self.column_se_corner + Vec3(1, height, -4), block.TORCH.withData(Torch.EAST), description="main column torch")) builds.append( Torch(self.column_se_corner + Vec3(3, height, 1), block.TORCH.withData(Torch.SOUTH), description="main column torch")) self._add_section("Turret - main column torches", builds)
def _create_torches(self): builds = [] # torches builds.append(Torch(Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-5,2,-8), block.TORCH.withData(Torch.SOUTH))) builds.append(Torch(Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-16,2,-8), block.TORCH.withData(Torch.SOUTH))) builds.append(Torch(Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-5,2,-1), block.TORCH.withData(Torch.WEST))) builds.append(Torch(Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-16,2,-1), block.TORCH.withData(Torch.EAST))) builds.append(Torch(Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-1,2,-4), block.TORCH.withData(Torch.NORTH))) builds.append(Torch(Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-20,2,-4), block.TORCH.withData(Torch.NORTH))) self._add_section("Bedroom torches", builds)
def _create_structure(self): super(Smithy, self)._create_structure() builds = [] builds.append( SubBuilding(OpenDoorway(Building.NORTH), Building.SE_CORNER_POS + Vec3(-3, 0, 0))) builds.append( SubBuilding(OpenDoorway(Building.EAST), Smithy.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2))) #builds.append(BuildingBlock(Smithy.WALLS_CORNER_POS['North East'] + Vec3(-2,1,0), # block.GLASS_PANE, # Smithy.WALLS_CORNER_POS['North East'] + Vec3(-5,1,0), # description="Window")) self._add_section("Smithy Doorways", builds) ############################################################################ # TODO: add fittings builds.append( BuildingBlock(Smithy.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 2), ANVIL, description="Anvil")) builds.append( BuildingBlock(Smithy.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1), block.CRAFTING_TABLE, description="crafting table")) builds.append( Chest(Smithy.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, -1), block.CHEST.withData(Chest.EAST), Smithy.WALLS_CORNER_POS['South East'] + Vec3(-2, 1, -1), description="South wall chests")) builds.append( Chest(Smithy.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -1), block.CHEST.withData(Chest.EAST), Smithy.WALLS_CORNER_POS['South West'] + Vec3(2, 1, -1), description="South wall chests")) builds.append( Chest(Smithy.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 1), block.CHEST.withData(Chest.EAST), Smithy.WALLS_CORNER_POS['North East'] + Vec3(-2, 1, 1), description="South wall chests")) builds.append( Chest(Smithy.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, -3), block.CHEST.withData(Chest.EAST), Smithy.WALLS_CORNER_POS['South East'] + Vec3(-1, 1, -4), description="South wall chests")) self._add_section("Smithy Fittings", builds) ############################################################################ #torches, # south wall torches either side of arched doorway builds.append( Torch(Smithy.WALLS_CORNER_POS['South East'] + Vec3(-2, 2, -1), block.TORCH.withData(Torch.NORTH))) builds.append( Torch(Smithy.WALLS_CORNER_POS['South West'] + Vec3(2, 2, -1), block.TORCH.withData(Torch.NORTH))) # torches in north east corner on north & east walls builds.append( Torch(Smithy.WALLS_CORNER_POS['North East'] + Vec3(-2, 2, 1), block.TORCH.withData(Torch.SOUTH))) builds.append( Torch(Smithy.WALLS_CORNER_POS['North East'] + Vec3(-1, 2, 2), block.TORCH.withData(Torch.WEST))) # torches in north west corner on north & west walls. builds.append( Torch(Smithy.WALLS_CORNER_POS['North West'] + Vec3(2, 2, 1), block.TORCH.withData(Torch.SOUTH))) # this is only torch on west wall, move closer to center builds.append( Torch(Smithy.WALLS_CORNER_POS['North West'] + Vec3(1, 2, 3), block.TORCH.withData(Torch.EAST))) # torch over doorway to corridor builds.append( Torch(Smithy.WALLS_CORNER_POS['South East'] + Vec3(-1, 2, -2), block.TORCH.withData(Torch.WEST))) self._add_section("Smithy Torches", builds)
def __init__(self, *args, **kwargs): super(Butcher, self).__init__(width=Butcher.WIDTH, *args, **kwargs) layer_blocks = [] ####################################################################### # level 1 # Pen layer_blocks.append( BuildingBlock(Butcher.PEN_CORNERS_POS['South West'], block.DIRT, Butcher.PEN_CORNERS_POS['North East'], description="Pen base")) walls = [] # Walls walls.append( BuildingBlock(Butcher.WALLS_CORNER_POS['South West'], block.COBBLESTONE, Butcher.WALLS_CORNER_POS['North West'], description="West wall base")) walls.append( BuildingBlock(Butcher.WALLS_CORNER_POS['North West'], block.COBBLESTONE, Butcher.WALLS_CORNER_POS['North East'], description="North wall base")) walls.append( BuildingBlock(Butcher.WALLS_CORNER_POS['North East'], block.COBBLESTONE, Butcher.WALLS_CORNER_POS['South East'], description="East wall base")) walls.append( BuildingBlock(Butcher.WALLS_CORNER_POS['South East'], block.COBBLESTONE, Butcher.WALLS_CORNER_POS['South West'], description="South wall base")) layer_blocks.extend(walls) # floor for pos1, pos2, block_type in Butcher.FLOOR_SPANS: layer_blocks.append( BuildingBlock(pos1, block_type, pos2, description="floor")) # door steps layer_blocks.append( Stair(Butcher.SOUTH_DOOR_POS + Vec3(0, 0, 1), block.STAIRS_COBBLESTONE.withData(Stair.NORTH), description="Front door step")) layer_blocks.append( BuildingBlock(Butcher.NORTH_DOOR_POS + Vec3(0, 0, -1), block.COBBLESTONE, description="Pen door step")) self.add_layer(BuildingLayer(layer_blocks, 0)) del layer_blocks[:] ####################################################################### # level 2 # Pen fences layer_blocks.append( BuildingBlock(Butcher.PEN_CORNERS_POS['South West'], block.FENCE, Butcher.PEN_CORNERS_POS['North West'], description="West pen fence")) layer_blocks.append( BuildingBlock(Butcher.PEN_CORNERS_POS['North West'], block.FENCE, Butcher.PEN_CORNERS_POS['North East'], description="North pen fence")) layer_blocks.append( BuildingBlock(Butcher.PEN_CORNERS_POS['North East'], block.FENCE, Butcher.PEN_CORNERS_POS['South East'], description="East pen fence")) # Walls layer_blocks.extend(walls) layer_blocks.append( BuildingBlock(Butcher.SOUTH_DOOR_POS, block.AIR, description="Clear front door")) layer_blocks.append( BuildingBlock(Butcher.NORTH_DOOR_POS, block.AIR, description="Clear pen door")) # table layer_blocks.append( BuildingBlock(Butcher.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1), block.WOOD_PLANKS, description="Table area corner")) layer_blocks.append( BuildingBlock(Butcher.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 2), block.FENCE, description="Table base")) layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 2), block.STAIRS_WOOD.withData(Stair.WEST), description="West seat")) layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 1), block.STAIRS_WOOD.withData(Stair.NORTH), description="North seat")) # counter layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['South East'] + Vec3(-2, 0, -1), block.STONE_SLAB_DOUBLE, Butcher.WALLS_CORNER_POS['South East'] + Vec3(-2, 0, -2), description="Counter")) self.add_layer(BuildingLayer(layer_blocks, 1)) del layer_blocks[:] ####################################################################### # level 3 # corners for key, pos in Butcher.WALLS_CORNER_POS.items(): layer_blocks.append( BuildingBlock(pos, block.COBBLESTONE, description=key + " corner")) # north and south walls layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0), block.WOOD_PLANKS, Butcher.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0), description="North wall")) layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['South West'] + Vec3(1, 0, 0), block.WOOD_PLANKS, Butcher.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0), description="South wall")) # east and west walls layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), block.WOOD, Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1), description="West wall")) layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), block.WOOD, Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1), description="East wall")) # windows for key, span in Butcher.WINDOW_SPANS.items(): # clear the space first: layer_blocks.append( BuildingBlock(span[0], block.GLASS_PANE, span[1], description=key + " window")) layer_blocks.append( BuildingBlock(Butcher.SOUTH_DOOR_POS, block.AIR, description="Clear front door")) layer_blocks.append( BuildingBlock(Butcher.NORTH_DOOR_POS, block.AIR, description="Clear pen door")) # TODO: table top layer_blocks.append( BuildingBlock(Butcher.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 2), TABLE_TOP, description="Table top")) self.add_layer(BuildingLayer(layer_blocks, 2)) del layer_blocks[:] ####################################################################### # level 4 # east & west stone walls layer_blocks.append( BuildingBlock(Butcher.WALLS_CORNER_POS['South West'], block.COBBLESTONE, Butcher.WALLS_CORNER_POS['North West'], description="West wall")) layer_blocks.append( BuildingBlock(Butcher.WALLS_CORNER_POS['South East'], block.COBBLESTONE, Butcher.WALLS_CORNER_POS['North East'], description="East wall")) # north and south wood walls layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0), block.WOOD_PLANKS, Butcher.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0), description="North wall")) layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['South West'] + Vec3(1, 0, 0), block.WOOD_PLANKS, Butcher.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0), description="South wall")) # north and south roof eaves layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, -1), block.STAIRS_WOOD.withData(Stair.SOUTH), Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, -1), description="North roof eaves")) layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, 1), block.STAIRS_WOOD.withData(Stair.NORTH), Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, 1), description="South roof eaves")) # torches over doors layer_blocks.append( Torch(Butcher.SOUTH_DOOR_POS + Vec3(0, 0, -1), block.TORCH.withData(Torch.NORTH), description="Torch over front door")) layer_blocks.append( Torch(Butcher.NORTH_DOOR_POS + Vec3(0, 0, 1), block.TORCH.withData(Torch.SOUTH), description="Torch over pen door")) self.add_layer(BuildingLayer(layer_blocks, 3)) del layer_blocks[:] ####################################################################### # level 5 # east & west gables layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), block.WOOD_PLANKS, Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1), description="West gable")) layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1), block.WOOD_PLANKS, Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), description="East gable")) # north and south rafters layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1), block.WOOD_PLANKS, Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1), description="North rafters")) layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), block.WOOD_PLANKS, Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), description="South rafters")) # north and south roof layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['North West'], block.STAIRS_WOOD.withData(Stair.SOUTH), Butcher.WALLS_CORNER_POS['North East'], description="North roof")) layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['South East'], block.STAIRS_WOOD.withData(Stair.NORTH), Butcher.WALLS_CORNER_POS['South West'], description="South roof")) self.add_layer(BuildingLayer(layer_blocks, 4)) del layer_blocks[:] ####################################################################### # level 6 # rafters layer_blocks.append( BuildingBlock( Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2), block.WOOD_PLANKS, Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 2), description="Rafters")) # north and south roof layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1), block.STAIRS_WOOD.withData(Stair.SOUTH), Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1), description="North roof")) layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), block.STAIRS_WOOD.withData(Stair.NORTH), Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), description="South roof")) self.add_layer(BuildingLayer(layer_blocks, 5)) del layer_blocks[:] ####################################################################### # level 7 # north and south roof layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 2), block.STAIRS_WOOD.withData(Stair.SOUTH), Butcher.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 2), description="North roof")) layer_blocks.append( Stair(Butcher.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -2), block.STAIRS_WOOD.withData(Stair.NORTH), Butcher.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2), description="South roof")) self.add_layer(BuildingLayer(layer_blocks, 6)) del layer_blocks[:] # add the door self.add_block( Door(None, Vec3(Butcher.SOUTH_DOOR_POS.x, 1, Butcher.SOUTH_DOOR_POS.z), block.DOOR_WOOD.withData(Door.SOUTH))) self.add_block( Door(None, Vec3(Butcher.NORTH_DOOR_POS.x, 1, Butcher.NORTH_DOOR_POS.z), block.DOOR_WOOD.withData(Door.NORTH))) self._set_orientation()
def _create_structure(self): super(Pantry, self)._create_structure() builds = [] builds.append( SubBuilding(OpenDoorway(Building.NORTH), Building.SE_CORNER_POS + Vec3(-3, 0, 0))) builds.append( SubBuilding(OpenDoorway(Building.EAST), Pantry.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -2))) self._add_section("Pantry Doorways", builds) ############################################################################ # add chests # on south wall builds.append( Chest(Pantry.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, -1), block.CHEST.withData(Chest.EAST), Pantry.WALLS_CORNER_POS['South East'] + Vec3(-2, 1, -1), description="South wall chests")) builds.append( Chest(Pantry.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -1), block.CHEST.withData(Chest.EAST), Pantry.WALLS_CORNER_POS['South West'] + Vec3(2, 1, -1), description="South wall chests")) # on north wall builds.append( Chest(Pantry.WALLS_CORNER_POS['North East'] + Vec3(-2, 0, 1), block.CHEST.withData(Chest.EAST), Pantry.WALLS_CORNER_POS['North East'] + Vec3(-3, 1, 1), description="South wall chests")) builds.append( Chest(Pantry.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1), block.CHEST.withData(Chest.EAST), Pantry.WALLS_CORNER_POS['North West'] + Vec3(2, 1, 1), description="South wall chests")) # on west wall builds.append( Chest(Pantry.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -3), block.CHEST.withData(Chest.EAST), Pantry.WALLS_CORNER_POS['South West'] + Vec3(1, 1, -4), description="South wall chests")) # on east wall builds.append( Chest(Pantry.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 2), block.CHEST.withData(Chest.EAST), Pantry.WALLS_CORNER_POS['North East'] + Vec3(-1, 1, 3), description="South wall chests")) self._add_section("Pantry Chests", builds) ############################################################################ #torches, # south wall torches either side of arched doorway builds.append( Torch(Pantry.WALLS_CORNER_POS['South East'] + Vec3(-2, 2, -1), block.TORCH.withData(Torch.NORTH))) builds.append( Torch(Pantry.WALLS_CORNER_POS['South West'] + Vec3(2, 2, -1), block.TORCH.withData(Torch.NORTH))) # torch on west wall sw corner builds.append( Torch(Pantry.WALLS_CORNER_POS['South West'] + Vec3(1, 2, -2), block.TORCH.withData(Torch.EAST))) # torches in north east corner on north & east walls builds.append( Torch(Pantry.WALLS_CORNER_POS['North East'] + Vec3(-2, 2, 1), block.TORCH.withData(Torch.SOUTH))) # this is only torch on west wall, move closer to center builds.append( Torch(Pantry.WALLS_CORNER_POS['North East'] + Vec3(-1, 2, 3), block.TORCH.withData(Torch.WEST))) # torches in north west corner on north & west walls. builds.append( Torch(Pantry.WALLS_CORNER_POS['North West'] + Vec3(2, 2, 1), block.TORCH.withData(Torch.SOUTH))) builds.append( Torch(Pantry.WALLS_CORNER_POS['North West'] + Vec3(1, 2, 2), block.TORCH.withData(Torch.EAST))) self._add_section("Pantry Torches", builds)
def _create_structure(self): super(EnchantingRoom, self)._create_structure() builds = [] builds.append( SubBuilding(OpenDoorway(Building.NORTH), Building.SE_CORNER_POS + Vec3(-1, 0, 0))) builds.append( SubBuilding( OpenDoorway(Building.EAST), EnchantingRoom.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -2))) #builds.append(BuildingBlock(EnchantingRoom.WALLS_CORNER_POS['North East'] + Vec3(-2,1,0), # block.GLASS_PANE, # EnchantingRoom.WALLS_CORNER_POS['North East'] + Vec3(-5,1,0), # description="Window")) self._add_section("Enchanting Room Doorways", builds) ############################################################################ # Bookshelves & enchanting table builds.append( BuildingBlock( EnchantingRoom.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -1), BOOK_SHELF, EnchantingRoom.WALLS_CORNER_POS['South West'] + Vec3(4, 1, -1), description="bookshelves")) builds.append( BuildingBlock( EnchantingRoom.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -1), BOOK_SHELF, EnchantingRoom.WALLS_CORNER_POS['South West'] + Vec3(1, 1, -5), description="bookshelves")) builds.append( BuildingBlock(EnchantingRoom.WALLS_CORNER_POS['South West'] + Vec3(3, 0, -3), ENCHANTING_TABLE, description="Enchanting table")) builds.append( Chest( EnchantingRoom.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 2), block.CHEST.withData(Chest.EAST), EnchantingRoom.WALLS_CORNER_POS['North East'] + Vec3(-1, 1, 3), description="South wall chests")) builds.append( Chest( EnchantingRoom.WALLS_CORNER_POS['North East'] + Vec3(-3, 0, 1), block.CHEST.withData(Chest.EAST), EnchantingRoom.WALLS_CORNER_POS['North East'] + Vec3(-4, 0, 1), description="South wall chests")) builds.append( BuildingBlock(EnchantingRoom.WALLS_CORNER_POS['North East'] + Vec3(-2, 0, 1), block.CRAFTING_TABLE, description="crafting table")) self._add_section("Enchanting Room Fittings", builds) ############################################################################ #torches, # south wall torches either side of arched doorway builds.append( Torch( EnchantingRoom.WALLS_CORNER_POS['South East'] + Vec3(-3, 2, -1), block.TORCH.withData(Torch.NORTH))) builds.append( Torch( EnchantingRoom.WALLS_CORNER_POS['South West'] + Vec3(2, 2, -1), block.TORCH.withData(Torch.NORTH))) # torch on west wall sw corner builds.append( Torch( EnchantingRoom.WALLS_CORNER_POS['South West'] + Vec3(1, 2, -2), block.TORCH.withData(Torch.EAST))) # torches in north east corner on north & east walls builds.append( Torch( EnchantingRoom.WALLS_CORNER_POS['North East'] + Vec3(-2, 2, 1), block.TORCH.withData(Torch.SOUTH))) # this is only torch on west wall, move closer to center builds.append( Torch( EnchantingRoom.WALLS_CORNER_POS['North East'] + Vec3(-1, 2, 3), block.TORCH.withData(Torch.WEST))) # torches in north west corner on north & west walls. builds.append( Torch( EnchantingRoom.WALLS_CORNER_POS['North West'] + Vec3(2, 2, 1), block.TORCH.withData(Torch.SOUTH))) builds.append( Torch( EnchantingRoom.WALLS_CORNER_POS['North West'] + Vec3(1, 2, 2), block.TORCH.withData(Torch.EAST))) self._add_section("Enchanting Room Torches", builds)
def __init__(self, *args, **kwargs): super(Church, self).__init__(width=Church.WIDTH, *args, **kwargs) ladder = Ladder(Church.LADDER_POS, block.LADDER.withData(Ladder.EAST), description="Ladder on facing east") layer_blocks = [] ####################################################################### # level 1 layer_blocks.append( BuildingBlock(Church.BASE_SPAN[0], block.COBBLESTONE, Church.BASE_SPAN[1], description="Base")) layer_blocks.append( BuildingBlock(Church.WALL_NW_SPAN[0], block.COBBLESTONE, Church.WALL_NW_SPAN[1], description="West Wall base")) layer_blocks.append( BuildingBlock(Church.WALL_NE_SPAN[0], block.COBBLESTONE, Church.WALL_NE_SPAN[1], description="East Wall base")) layer_blocks.append( Stair(Church.DOOR_POS + Vec3(0, 0, 1), block.STAIRS_COBBLESTONE.withData(Stair.NORTH), description="Front Stair")) self.add_layer(BuildingLayer(layer_blocks, 0)) del layer_blocks[:] ####################################################################### # common blocks walls = [] walls.append( BuildingBlock(Church.WALL_W_SPAN[0], block.COBBLESTONE, Church.WALL_W_SPAN[1], description="Full west wall")) walls.append( BuildingBlock(Church.WALL_N_SPAN[0], block.COBBLESTONE, Church.WALL_N_SPAN[1], description="North wall")) walls.append( BuildingBlock(Church.WALL_E_SPAN[0], block.COBBLESTONE, Church.WALL_E_SPAN[1], description="Full East wall")) walls.append( BuildingBlock(Church.WALL_S_SPAN[0], block.COBBLESTONE, Church.WALL_S_SPAN[1], description="South wall")) walls.append(ladder) ####################################################################### # level 2 layer_blocks.extend(walls) layer_blocks.append( BuildingBlock(Church.DOOR_POS, block.AIR, description="Clearing Door")) layer_blocks.append( BuildingBlock(Building.SE_CORNER_POS + Vec3(-3, 0, -7), block.COBBLESTONE, Building.SE_CORNER_POS + Vec3(-1, 0, -8), description="Altar base")) layer_blocks.append( Stair(Building.SE_CORNER_POS + Vec3(-3, 0, -6), block.STAIRS_COBBLESTONE.withData(Stair.NORTH), description="West Stair, facing north")) layer_blocks.append( Stair(Building.SE_CORNER_POS + Vec3(-2, 0, -7), block.STAIRS_COBBLESTONE.withData(Stair.NORTH), description="Center Stair, facing north")) layer_blocks.append( Stair(Building.SE_CORNER_POS + Vec3(-1, 0, -6), block.STAIRS_COBBLESTONE.withData(Stair.NORTH), description="East Stair, facing north")) self.add_layer(BuildingLayer(layer_blocks, 1)) del layer_blocks[:] ####################################################################### # level 3 layer_blocks.extend(walls) layer_blocks.append( BuildingBlock(Church.DOOR_POS, block.AIR, description="Clearing Door")) layer_blocks.append( Stair(Building.SE_CORNER_POS + Vec3(-3, 0, -8), block.STAIRS_COBBLESTONE.withData(Stair.WEST), description="West stair, facing west")) layer_blocks.append( Stair(Building.SE_CORNER_POS + Vec3(-1, 0, -8), block.STAIRS_COBBLESTONE.withData(Stair.EAST), description="East stair, facing east")) for pos in Church.WINS_S_POS: layer_blocks.append( BuildingBlock(pos, block.GLASS_PANE, description="Glass pane, south")) self.add_layer(BuildingLayer(layer_blocks, 2)) del layer_blocks[:] ####################################################################### # level 4 layer_blocks.extend(walls) for pos in Church.WINS_S_POS: layer_blocks.append( BuildingBlock(pos, block.GLASS_PANE, description="Glass pane, south")) for pos in Church.WINS_N_POS: layer_blocks.append( BuildingBlock(pos, block.GLASS_PANE, description="Glass pane, north")) self.add_layer(BuildingLayer(layer_blocks, 3)) del layer_blocks[:] ####################################################################### # level 5 # insert the tower floor before the ladder in the walls list here walls.insert( 4, BuildingBlock(Church.TOWER_FLOOR_SPAN[0], block.COBBLESTONE, Church.TOWER_FLOOR_SPAN[1], description="Tower floor")) layer_blocks.extend(walls) layer_blocks.append( BuildingBlock(Church.WALL_TN_SPAN[0], block.COBBLESTONE, Church.WALL_TN_SPAN[1], description="Tower north wall")) layer_blocks.append( BuildingBlock(Building.SE_CORNER_POS + Vec3(-4, 0, -1), block.COBBLESTONE, description="Filling south west corner")) layer_blocks.append( BuildingBlock(Building.SE_CORNER_POS + Vec3(0, 0, -1), block.COBBLESTONE, description="Filling south east corner")) layer_blocks.append( Torch(Building.SE_CORNER_POS + Vec3(-1, 0, -7), block.TORCH.withData(Torch.WEST), description="East wall torch facing west")) layer_blocks.append( Torch(Building.SE_CORNER_POS + Vec3(-2, 0, -6), block.TORCH.withData(Torch.NORTH), description="South wall torch facing north")) layer_blocks.append( Torch(Building.SE_CORNER_POS + Vec3(-3, 0, -7), block.TORCH.withData(Torch.EAST), description="West wall torch facing east")) layer_blocks.append( Torch(Building.SE_CORNER_POS + Vec3(-2, 0, -8), block.TORCH.withData(Torch.SOUTH), description="North wall torch facing south")) self.add_layer(BuildingLayer(layer_blocks, 4)) del layer_blocks[:] # reset walls for tower del walls[:] walls.append( BuildingBlock(Church.WALL_SW_SPAN[0], block.COBBLESTONE, Church.WALL_SW_SPAN[1], description="Tower west wall")) walls.append( BuildingBlock(Church.WALL_TN_SPAN[0], block.COBBLESTONE, Church.WALL_TN_SPAN[1], description="Tower north wall")) walls.append( BuildingBlock(Church.WALL_SE_SPAN[0], block.COBBLESTONE, Church.WALL_SE_SPAN[1], description="Tower east wall")) walls.append( BuildingBlock(Church.WALL_S_SPAN[0], block.COBBLESTONE, Church.WALL_S_SPAN[1], description="Tower south wall")) walls.append(ladder) # level 6 layer_blocks.extend(walls) layer_blocks.append( BuildingBlock(Church.ROOF_SPAN[0], block.COBBLESTONE, Church.ROOF_SPAN[1], description="Northern roof span")) self.add_layer(BuildingLayer(layer_blocks, 5)) del layer_blocks[:] # levels 7 & 8 are same layer_blocks.extend(walls) for pos in Church.TOWER_WIN_POS: layer_blocks.append( BuildingBlock(pos, block.GLASS_PANE, description="Tower window")) self.add_layer(BuildingLayer(layer_blocks, 6)) self.add_layer(BuildingLayer(layer_blocks, 7)) del layer_blocks[:] # level 9 # nothing to add here just tower walls self.add_layer(BuildingLayer(walls, 8)) # level 10 # insert floor into walls here before ladder # fill corners of tower at this level walls.insert( 4, BuildingBlock(Church.TOWER_FLOOR_SPAN[0], block.COBBLESTONE, Church.TOWER_FLOOR_SPAN[1], description="Tower floor")) self.add_layer(BuildingLayer(walls, 9)) # level 11 # remove floor & ladder at his level. walls = walls[:4] self.add_layer(BuildingLayer(walls, 10)) # level 12 for pos in Church.TOWER_WIN_POS: layer_blocks.append( BuildingBlock(pos, block.COBBLESTONE, description="Tower crenellation")) self.add_layer(BuildingLayer(layer_blocks, 11)) del layer_blocks[:] # add the door self.add_block( Door(None, Vec3(Church.DOOR_POS.x, 1, Church.DOOR_POS.z), block.DOOR_WOOD.withData(Door.SOUTH))) self._set_orientation()
def _create_stairs(self): builds = [] heights = [0, WALL_HEIGHT] # starting height for staircases for height in heights: # north facing stairs & head clearance stair_direction = Stair.EAST if self.mirrored: stair_direction = Stair.WEST builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-3), height, -1), block.AIR, self.column_se_corner + Vec3(self._get_x(-3), height + 3, -2), description="Stair clearance")) builds.append( Stair( self.column_se_corner + Vec3(self._get_x(-3), height, -1), STAIRS_STONE_BRICK.withData(stair_direction), self.column_se_corner + Vec3(self._get_x(-3), height, -2), description="Stair")) builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-2), height + 1, -1), block.AIR, self.column_se_corner + Vec3(self._get_x(-2), height + 4, -2), description="Stair clearance")) builds.append( Stair(self.column_se_corner + Vec3(self._get_x(-2), height + 1, -1), STAIRS_STONE_BRICK.withData(stair_direction), self.column_se_corner + Vec3(self._get_x(-2), height + 1, -2), description="Stair")) # clear landing & space for next stair builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-1), height + 2, -2), block.AIR, self.column_se_corner + Vec3(self._get_x(-2), height + 5, -3), description="Stair clearance")) builds.append( Stair(self.column_se_corner + Vec3(self._get_x(-1), height + 2, -3), STAIRS_STONE_BRICK.withData(Stair.NORTH), self.column_se_corner + Vec3(self._get_x(-2), height + 2, -3), description="Stair")) builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-1), height + 3, -4), block.AIR, self.column_se_corner + Vec3(self._get_x(-2), height + 6, -4), description="Stair clearance")) builds.append( Stair(self.column_se_corner + Vec3(self._get_x(-1), height + 3, -4), STAIRS_STONE_BRICK.withData(Stair.NORTH), self.column_se_corner + Vec3(self._get_x(-2), height + 3, -4), description="Stair")) torch_orientation = Torch.WEST if self.mirrored: torch_orientation = Torch.EAST builds.append( Torch(self.column_se_corner + Vec3(self._get_x(-1), height + 5, -4), block.TORCH.withData(Torch.WEST), description="Torch")) # clear landing & space for next stair builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-1), height + 4, -5), block.AIR, self.column_se_corner + Vec3(self._get_x(-1), height + 7, -5), description="landing clearance")) builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-2), height + 4, -5), block.AIR, self.column_se_corner + Vec3(self._get_x(-2), height + 7, -6), description="Stair clearance")) stair_direction = Stair.WEST if self.mirrored: stair_direction = Stair.EAST builds.append( Stair(self.column_se_corner + Vec3(self._get_x(-2), height + 4, -5), STAIRS_STONE_BRICK.withData(stair_direction), self.column_se_corner + Vec3(self._get_x(-2), height + 4, -6), description="Stair")) builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-3), height + 5, -5), block.AIR, self.column_se_corner + Vec3(self._get_x(-3), height + 8, -6), description="Stair clearance")) builds.append( Stair(self.column_se_corner + Vec3(self._get_x(-3), height + 5, -5), STAIRS_STONE_BRICK.withData(stair_direction), self.column_se_corner + Vec3(self._get_x(-3), height + 5, -6), description="Stair")) # clear walk space to wall builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-4), WALL_HEIGHT, -4), block.AIR, self.column_se_corner + Vec3(self._get_x(-5), WALL_HEIGHT + 2, -6), description="Walk space clearance to wall top")) builds.append( Torch(self.column_se_corner + Vec3(self._get_x(-5), WALL_HEIGHT + 2, -6), block.TORCH.withData(Torch.SOUTH), description="Torch")) self._add_section("Corner Turret stairs", builds)
def __init__(self, *args, **kwargs): super(SmallHouseV1, self).__init__(width=SmallHouseV1.WIDTH, *args, **kwargs) ####################################################################### # Level 1: layer_blocks = [] layer_blocks.append( BuildingBlock(SmallHouseV1.WALLS_CORNER_POS['South West'], block.COBBLESTONE, SmallHouseV1.WALLS_CORNER_POS['North East'], description="House base")) layer_blocks.append( Stair(SmallHouseV1.STEP_POS, block.STAIRS_COBBLESTONE.withData(Stair.NORTH), description="Front step")) self.add_layer(BuildingLayer(layer_blocks, 0)) del layer_blocks[:] ####################################################################### # Common blocks: walls = [] # cobblestone corners for key, pos in SmallHouseV1.WALLS_CORNER_POS.items(): walls.append( BuildingBlock(pos, block.COBBLESTONE, description="Corner stone")) # wood plank walls for pos1, pos2, desc in SmallHouseV1.WALL_SPANS: walls.append(BuildingBlock(pos1, block.WOOD_PLANKS, pos2, desc)) # ladder ladder = Ladder(SmallHouseV1.LADDER_POS, block.LADDER.withData(Ladder.SOUTH), description="Ladder") walls.append(ladder) ####################################################################### # Level 2: # add walls as above & clear door layer_blocks.extend(walls) layer_blocks.append( BuildingBlock(SmallHouseV1.DOOR_POS, block.AIR, description="Clear door")) self.add_layer(BuildingLayer(layer_blocks, 1)) del layer_blocks[:] ####################################################################### # Level 3: # add walls, clear door & add windows layer_blocks.extend(walls) layer_blocks.append( BuildingBlock(SmallHouseV1.DOOR_POS, block.AIR, description="Clear door")) for pos in SmallHouseV1.WIN_POS: layer_blocks.append( BuildingBlock(pos, block.GLASS_PANE, description="Window")) self.add_layer(BuildingLayer(layer_blocks, 2)) del layer_blocks[:] ####################################################################### # Level 4: # add walls & torch over door layer_blocks.extend(walls) layer_blocks.append( Torch(SmallHouseV1.TORCH_POS, block.TORCH.withData(Torch.NORTH), description="Torch over door")) self.add_layer(BuildingLayer(layer_blocks, 3)) del layer_blocks[:] ####################################################################### # build the roof layer_blocks.append( BuildingBlock(SmallHouseV1.WALLS_CORNER_POS['South East'], block.WOOD, SmallHouseV1.WALLS_CORNER_POS['North West'], description="Roof wood span")) layer_blocks.append( BuildingBlock( SmallHouseV1.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, -1), block.WOOD_PLANKS, SmallHouseV1.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1), description="Roof wood plank span")) layer_blocks.append( BuildingBlock(SmallHouseV1.LADDER_POS, block.AIR, description="Clear ladder space")) layer_blocks.append(ladder) self.add_layer(BuildingLayer(layer_blocks, 4)) del layer_blocks[:] ####################################################################### # add the fences to the roof layer_blocks.append( BuildingBlock(SmallHouseV1.WALLS_CORNER_POS['South East'], block.FENCE, SmallHouseV1.WALLS_CORNER_POS['North West'], description="Cover roof with fences")) layer_blocks.append( BuildingBlock( SmallHouseV1.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, -1), block.AIR, SmallHouseV1.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1), description="Clear fences from inner roof")) self.add_layer(BuildingLayer(layer_blocks, 5)) del layer_blocks[:] ####################################################################### # add the door self.add_block( Door(Door.HINGE_RIGHT, Vec3(SmallHouseV1.DOOR_POS.x, 1, SmallHouseV1.DOOR_POS.z), block.DOOR_WOOD.withData(Door.SOUTH), description="Front door")) self._set_orientation()
def __init__(self, *args, **kwargs): super(SmallHouseV2Base, self).__init__(width=SmallHouseV2Base.WIDTH, *args, **kwargs) ####################################################################### # Level 1: layer_blocks = [] layer_blocks.append( BuildingBlock(SmallHouseV2Base.WALLS_CORNER_POS['South West'], block.COBBLESTONE, SmallHouseV2Base.WALLS_CORNER_POS['North East'], description="House base")) layer_blocks.append( BuildingBlock(SmallHouseV2Base.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, -1), block.DIRT, SmallHouseV2Base.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1), description="House inner base")) layer_blocks.append( Stair(SmallHouseV2Base.STEP_POS, block.STAIRS_COBBLESTONE.withData(Stair.NORTH), description="Front step")) self.add_layer(BuildingLayer(layer_blocks, 0)) del layer_blocks[:] ####################################################################### # Common blocks: walls = [] # wood corners for key, pos in SmallHouseV2Base.WALLS_CORNER_POS.items(): walls.append( BuildingBlock(pos, block.WOOD, description="Corner wood")) # wood plank walls for pos1, pos2, desc in SmallHouseV2Base.WALL_SPANS: walls.append(BuildingBlock(pos1, block.WOOD_PLANKS, pos2, desc)) ####################################################################### # Level 2: # add walls as above & clear door layer_blocks.extend(walls) layer_blocks.append( BuildingBlock(SmallHouseV2Base.DOOR_POS, block.AIR, description="Clear door")) self.add_layer(BuildingLayer(layer_blocks, 1)) del layer_blocks[:] ####################################################################### # Level 3: # add walls, clear door & add windows layer_blocks.extend(walls) layer_blocks.append( BuildingBlock(SmallHouseV2Base.DOOR_POS, block.AIR, description="Clear door")) for pos in SmallHouseV2Base.WIN_POS: layer_blocks.append( BuildingBlock(pos, block.GLASS_PANE, description="Window")) self.add_layer(BuildingLayer(layer_blocks, 2)) del layer_blocks[:] ####################################################################### # Level 4: # add walls & torch over door layer_blocks.extend(walls) layer_blocks.append( Torch(SmallHouseV2Base.TORCH_POS, block.TORCH.withData(Torch.NORTH), description="Torch over door")) self.add_layer(BuildingLayer(layer_blocks, 3)) del layer_blocks[:] # add the door self.add_block( Door(None, Vec3(SmallHouseV2Base.DOOR_POS.x, 1, SmallHouseV2Base.DOOR_POS.z), block.DOOR_WOOD.withData(Door.SOUTH), description="Front door"))
def __init__(self, *args, **kwargs): super(LargeHouse, self).__init__(width=LargeHouse.WIDTH, *args, **kwargs) layer_blocks = [] ####################################################################### # common blocks walls = [] walls.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['North West'], description="West wall")) walls.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['North West'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['North East'], description="North wall")) walls.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['North East'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['East mid west'], description="East wall, north section")) walls.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['East mid east'], description="East wall, extension")) walls.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid east'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['South East'], description="East wall, south section")) walls.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['South East'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['South West'], description="South wall")) ####################################################################### # level 1 layer_blocks.extend(walls) for floor_span in LargeHouse.FLOOR_SPANS: layer_blocks.append( BuildingBlock(floor_span[0], block.WOOD_PLANKS, floor_span[1], description="Floor")) layer_blocks.append( Stair(LargeHouse.DOOR_POS + Vec3(0, 0, 1), block.STAIRS_COBBLESTONE.withData(Stair.NORTH), description="Front Stair")) self.add_layer(BuildingLayer(layer_blocks, 0)) del layer_blocks[:] ####################################################################### # level 2 layer_blocks.extend(walls) # Clear door space layer_blocks.append( BuildingBlock(LargeHouse.DOOR_POS, block.AIR, description="Clear door")) self.add_layer(BuildingLayer(layer_blocks, 1)) del layer_blocks[:] ####################################################################### # level 3 # west wall windows = [] for pos1, pos2, desc in LargeHouse.WINDOW_SPANS: windows.append( BuildingBlock(pos1, block.WOOD, pos2, description=desc + " frame")) windows.append( BuildingBlock(pos1 + Vec3(0, 0, -1), block.GLASS_PANE, pos2 + Vec3(0, 0, 1), description=desc)) windows.append( BuildingBlock(LargeHouse.SOUTH_WIN_SPAN[0], block.WOOD, LargeHouse.SOUTH_WIN_SPAN[1], description=LargeHouse.SOUTH_WIN_SPAN[2] + " frame")) windows.append( BuildingBlock(LargeHouse.SOUTH_WIN_SPAN[0] + Vec3(-1, 0, 0), block.GLASS_PANE, LargeHouse.SOUTH_WIN_SPAN[1] + Vec3(1, 0, 0), description=LargeHouse.SOUTH_WIN_SPAN[2])) # north wall is cobblestone, layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['North East'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['North West'], description="North wall")) # outer corners are cobblestone layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'], block.COBBLESTONE, description="South West corner")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['South East'], block.COBBLESTONE, description="South East corner")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid east'], block.COBBLESTONE, description="East extension corner")) # place wood plank blocks layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'], block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(1, 0, 0), description="East extension, planks")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -5), block.WOOD_PLANKS, description="West wall, planks")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, 0), block.WOOD_PLANKS, description="South wall, planks")) layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(-3, 0, 0), description="South wall, door frame")) # clear door layer_blocks.append( BuildingBlock(LargeHouse.DOOR_POS, block.AIR, description="Clear door")) # add windows layer_blocks.extend(windows) self.add_layer(BuildingLayer(layer_blocks, 2)) del layer_blocks[:] ####################################################################### # level 4 # walls # West, North & North east cobblestone walls layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['North West'], description="West wall")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['North West'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['North East'], description="North wall")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['North East'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(0, 0, -1), description="East wall, north section")) # wooden east extension wall layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'], block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['East mid east'] + Vec3(-1, 0, 0), description="East wall, extension")) # south east cobblestone wall layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid east'], block.COBBLESTONE, LargeHouse.WALLS_CORNER_POS['South East'], description="East wall, south section")) # wooden south wall (cobblestone corners) layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, 0), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0), description="South wall")) # roof eaves # south roof eaves layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, 1), block.STAIRS_WOOD.withData(Stair.NORTH), LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, 1), description="South roof eaves")) # layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(1, 0, -1), block.WOOD_PLANKS, description="East roof eaves corner")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(1, 0, 0), block.STAIRS_WOOD.withData(Stair.WEST), LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(1, 0, 3), description="East roof eaves, west facing")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['East mid east'] + Vec3(0, 0, -1), block.STAIRS_WOOD.withData(Stair.SOUTH), description="East roof eaves, north facing")) layer_blocks.append( Torch(LargeHouse.DOOR_POS + Vec3(0, 0, -1), block.TORCH.withData(Torch.NORTH))) self.add_layer(BuildingLayer(layer_blocks, 3)) del layer_blocks[:] ####################################################################### # level 5 # west roof & gable layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -1), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0), description="West roof rafters")) layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -4), description="West roof gable")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -5), block.STAIRS_WOOD.withData(Stair.EAST), LargeHouse.WALLS_CORNER_POS['North West'], description="West roof")) # north gable window layer_blocks.append( BuildingBlock(LargeHouse.NORTH_WIN_SPAN[0], block.WOOD, LargeHouse.NORTH_WIN_SPAN[1], description=LargeHouse.NORTH_WIN_SPAN[2] + " frame")) layer_blocks.append( BuildingBlock(LargeHouse.NORTH_WIN_SPAN[0] + Vec3(-1, 0, 0), block.GLASS_PANE, LargeHouse.NORTH_WIN_SPAN[1] + Vec3(1, 0, 0), description=LargeHouse.NORTH_WIN_SPAN[2])) # east rafters & gable layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(-1, 0, 1), description="East roof rafters")) layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(-1, 0, 1), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['East mid east'] + Vec3(0, 0, 1), description="East roof extension rafters")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['East mid west'], block.WOOD_PLANKS, description="East roof extension corner rafter")) layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['East mid east'] + Vec3(0, 0, 1), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), description="East gable")) # east roof layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['North East'], block.STAIRS_WOOD.withData(Stair.WEST), LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(0, 0, -1), description="East roof")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['East mid west'] + Vec3(1, 0, 0), block.STAIRS_WOOD.withData(Stair.SOUTH), LargeHouse.WALLS_CORNER_POS['East mid east'], description="East roof extension")) # south roof layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), description="South roof rafters")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['South West'], block.STAIRS_WOOD.withData(Stair.NORTH), LargeHouse.WALLS_CORNER_POS['South East'], description="South roof")) self.add_layer(BuildingLayer(layer_blocks, 4)) del layer_blocks[:] ####################################################################### # level 6 # rafters layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -3), description="West to east roof rafters & gables")) layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(2, 0, -4), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 0), description="West rafters")) layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(4, 0, -4), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(4, 0, 0), description="East rafters")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -4), block.WOOD_PLANKS, description="West roof rafter corner")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(5, 0, -4), block.WOOD_PLANKS, description="East roof rafter corner")) layer_blocks.append( BuildingBlock(LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(3, 0, 0), block.WOOD_PLANKS, description="North gable")) # roof layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -4), block.STAIRS_WOOD.withData(Stair.SOUTH), description="West roof north facing")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -5), block.STAIRS_WOOD.withData(Stair.EAST), LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0), description="West roof")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0), block.STAIRS_WOOD.withData(Stair.WEST), LargeHouse.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 5), description="East roof")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['East mid east'] + Vec3(0, 0, 1), block.STAIRS_WOOD.withData(Stair.SOUTH), LargeHouse.WALLS_CORNER_POS['East mid east'] + Vec3(-2, 0, 1), description="east roof north facing")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), block.STAIRS_WOOD.withData(Stair.NORTH), LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), description="South roof")) self.add_layer(BuildingLayer(layer_blocks, 5)) del layer_blocks[:] ####################################################################### # level 7 layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(2, 0, -3), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(4, 0, -3), description="East - west rafters")) layer_blocks.append( BuildingBlock( LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(3, 0, 0), block.WOOD_PLANKS, LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(3, 0, 6), description="North - south rafters")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -3), block.STAIRS_WOOD.withData(Stair.SOUTH), LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -3), description="West roof north facing")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 0), block.STAIRS_WOOD.withData(Stair.EAST), LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 6), description="West roof")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(4, 0, 0), block.STAIRS_WOOD.withData(Stair.WEST), LargeHouse.WALLS_CORNER_POS['North West'] + Vec3(4, 0, 6), description="East roof")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -3), block.STAIRS_WOOD.withData(Stair.SOUTH), LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(-3, 0, -3), description="east roof north facing")) layer_blocks.append( Stair(LargeHouse.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2), block.STAIRS_WOOD.withData(Stair.NORTH), LargeHouse.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -2), description="South roof")) self.add_layer(BuildingLayer(layer_blocks, 6)) del layer_blocks[:] ####################################################################### # add the door self.add_block( Door(None, Vec3(LargeHouse.DOOR_POS.x, 1, LargeHouse.DOOR_POS.z), block.DOOR_WOOD.withData(Door.SOUTH))) self._set_orientation()
def _create_second_floor_fittings(self): builds = [] # TODO: add windows to turret access corridors # torches by north turret access points builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-2,self.second_storey_level+2,-25), block.TORCH.withData(Torch.SOUTH))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-25,self.second_storey_level+2,-25), block.TORCH.withData(Torch.SOUTH))) # torches on north turret access corridors builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-2,self.second_storey_level+2,-18), block.TORCH.withData(Torch.NORTH))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-25,self.second_storey_level+2,-18), block.TORCH.withData(Torch.NORTH))) # Bed room door torches builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-11,self.second_storey_level+2,-19), block.TORCH.withData(Torch.SOUTH))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-16,self.second_storey_level+2,-19), block.TORCH.withData(Torch.SOUTH))) # east room torches builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-8,self.second_storey_level+2,-5), block.TORCH.withData(Torch.WEST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-8,self.second_storey_level+2,-10), block.TORCH.withData(Torch.WEST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-8,self.second_storey_level+2,-15), block.TORCH.withData(Torch.WEST))) # West room torches builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-19,self.second_storey_level+2,-5), block.TORCH.withData(Torch.EAST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-19,self.second_storey_level+2,-10), block.TORCH.withData(Torch.EAST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-19,self.second_storey_level+2,-15), block.TORCH.withData(Torch.EAST))) # south room door torches builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-11,self.second_storey_level+2,-8), block.TORCH.withData(Torch.NORTH))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-16,self.second_storey_level+2,-8), block.TORCH.withData(Torch.NORTH))) # torches on south turret access corridors builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-9,self.second_storey_level+2,-2), block.TORCH.withData(Torch.EAST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-18,self.second_storey_level+2,-2), block.TORCH.withData(Torch.WEST))) # torches by south turret access points builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-4,self.second_storey_level+2,-2), block.TORCH.withData(Torch.WEST))) builds.append(Torch(Castle.WALLS_CORNER_POS['South East'] + Vec3(-23,self.second_storey_level+2,-2), block.TORCH.withData(Torch.EAST))) self._add_section("Second storey torches", builds) # North east corridor windows builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(0,self.second_storey_level+1,-25), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(0,self.second_storey_level+2,-25), description="window")) builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(0,self.second_storey_level+1,-22), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(0,self.second_storey_level+2,-22), description="window")) builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(0,self.second_storey_level+1,-19), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(0,self.second_storey_level+2,-19), description="window")) # North west corridor windows builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(-27,self.second_storey_level+1,-25), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(-27,self.second_storey_level+2,-25), description="window")) builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(-27,self.second_storey_level+1,-22), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(-27,self.second_storey_level+2,-22), description="window")) builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(-27,self.second_storey_level+1,-19), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(-27,self.second_storey_level+2,-19), description="window")) # south east corridor windows builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(-5,self.second_storey_level+1,0), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(-5,self.second_storey_level+2,0), description="window")) builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(-8,self.second_storey_level+1,0), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(-8,self.second_storey_level+2,0), description="window")) # south west corridor windows builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(-19,self.second_storey_level+1,0), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(-19,self.second_storey_level+2,0), description="window")) builds.append(BuildingBlock(Castle.WALLS_CORNER_POS['South East'] + Vec3(-22,self.second_storey_level+1,0), block.GLASS_PANE, Castle.WALLS_CORNER_POS['South East'] + Vec3(-22,self.second_storey_level+2,0), description="window")) self._add_section("Second storey windows", builds)
def __init__(self, *args, **kwargs): super(ApartmentBlock, self).__init__(width=ApartmentBlock.WIDTH, *args, **kwargs) builds = [] ####################################################################### # build entire apt block from spans: # "concrete" structure (smooth stone) builds.append( BuildingBlock(ApartmentBlock.APT_BLOCK_SPAN[0], block.STONE, ApartmentBlock.APT_BLOCK_SPAN[1], description="Apt block stone super structure")) # 17 apt wall sections per floor can be done using 5 wood spans & 6 interior spaces # build wood plank spans for key, span in ApartmentBlock.WOOD_PLANK_SPANS.items(): for pos in ApartmentBlock.WOOD_PLANK_POS[key]: # ground floor builds.append( BuildingBlock(span[0] + pos, block.WOOD_PLANKS, span[1] + pos, description="%s wood span ground floor" % (key))) # 2nd floor builds.append( BuildingBlock(span[0] + pos + Vec3(0, 4, 0), block.WOOD_PLANKS, span[1] + pos + Vec3(0, 4, 0), description="%s wood span 2nd floor" % (key))) # clear apt interiors (this will leave concrete floors & ceilings) for pos in ApartmentBlock.APT_INTERIOR_POS: # ground floor builds.append( BuildingBlock(ApartmentBlock.APT_INTERIOR_SPAN[0] + pos, block.AIR, ApartmentBlock.APT_INTERIOR_SPAN[1] + pos, description="Clear apt interior ground floor")) # 2nd floor builds.append( BuildingBlock( ApartmentBlock.APT_INTERIOR_SPAN[0] + pos + Vec3(0, 4, 0), block.AIR, ApartmentBlock.APT_INTERIOR_SPAN[1] + pos + Vec3(0, 4, 0), description="Clear apt interior 2nd floor")) # add torch to SW croner of block to indicte when this section has completed buiding in game #builds.append(Torch(Vec3(-11,3,-3), block.TORCH.withData(Torch.WEST), # description="section complete indicator")) self._add_section("Apt block super structure", builds) # doors & torches # TODO: debug this: East side apartments have doors "facing" east (built on east side of block) # East side apts torches should face west, but applied on east face of containing block (west face of support block) # TODO: add doc strings to doors and torches on what the orientation means for pos in ApartmentBlock.APT_DOORS_POS["East"]: # ground floor builds.append( Door(Door.HINGE_RIGHT, pos, block.DOOR_WOOD.withData(Door.EAST), description="Ground floor door east side")) builds.append( Torch(pos + Vec3(-1, 2, 0), block.TORCH.withData(Torch.WEST), description="Ground floor interior torch")) builds.append( Torch(pos + Vec3(1, 2, 0), block.TORCH.withData(Torch.EAST), description="Ground floor exterior torch")) # 2nd floor builds.append( Door(Door.HINGE_RIGHT, pos + Vec3(0, 4, 0), block.DOOR_WOOD.withData(Door.EAST), description="2nd floor door east side")) builds.append( Torch(pos + Vec3(-1, 6, 0), block.TORCH.withData(Torch.WEST), description="2nd floor interior torch")) builds.append( Torch(pos + Vec3(1, 6, 0), block.TORCH.withData(Torch.EAST), description="2nd floor exterior torch")) for pos in ApartmentBlock.APT_DOORS_POS["West"]: # ground floor builds.append( Door(Door.HINGE_LEFT, pos, block.DOOR_WOOD.withData(Door.WEST), description="Ground floor door west side")) builds.append( Torch(pos + Vec3(1, 2, 0), block.TORCH.withData(Torch.EAST), description="Ground floor interior torch")) builds.append( Torch(pos + Vec3(-1, 2, 0), block.TORCH.withData(Torch.WEST), description="Ground floor exterior torch")) # 2nd floor builds.append( Door(Door.HINGE_LEFT, pos + Vec3(0, 4, 0), block.DOOR_WOOD.withData(Door.WEST), description="2nd floor door west side")) builds.append( Torch(pos + Vec3(1, 6, 0), block.TORCH.withData(Torch.EAST), description="2nd floor interior torch")) builds.append( Torch(pos + Vec3(-1, 6, 0), block.TORCH.withData(Torch.WEST), description="2nd floor exterior torch")) # windows for pos in ApartmentBlock.APT_WINS_POS: builds.append( BuildingBlock(pos, block.GLASS_PANE, description="ground floor window")) builds.append( BuildingBlock(pos + Vec3(0, 4, 0), block.GLASS_PANE, description="2nd floor window")) # add torch to SW croner of block to indicte when this section has completed buiding in game #builds.append(Torch(Vec3(-11,2,-3), block.TORCH.withData(Torch.WEST), # description="section complete indicator")) self._add_section("Apt block fittings", builds) ####################################################################### # Ground floor walkway & steps # stone walk way builds.extend(self._add_walkway(block.STONE, 0)) # stone steps at end of each walkway # TODO: block data for stone brick stairs builds.append( Stair(ApartmentBlock.CORNER_POS['South East'] + Vec3(0, 0, 1), Block(109).withData(Stair.NORTH), ApartmentBlock.CORNER_POS['South East'] + Vec3(-1, 0, 1), description="Ground floor steps")) builds.append( Stair(ApartmentBlock.CORNER_POS['South West'] + Vec3(1, 0, 1), Block(109).withData(Stair.NORTH), ApartmentBlock.CORNER_POS['South West'] + Vec3(0, 0, 1), description="Ground floor steps")) self._add_section("Ground floor walkway", builds) ####################################################################### # Support posts for 2nd floor walkway for pos in ApartmentBlock.CORNER_POS.values(): builds.append( BuildingBlock(pos + Vec3(0, 1, 0), block.FENCE, pos + Vec3(0, 3, 0), description="Corner post")) self._add_section("2nd floor support posts", builds) ####################################################################### # 2nd floor walkway # wooden walk way around 2nd floor builds.extend(self._add_walkway(block.WOOD_PLANKS, 4)) self._add_section("2nd floor wooden walkway", builds) ####################################################################### # Stairs to 2nd floor for i in range(0, 5): # wooden steps to 2nd floor. builds.append( Stair(ApartmentBlock.CORNER_POS['South East'] + Vec3(-8 + i, i, 1), block.STAIRS_WOOD.withData(Stair.EAST), description="Steps to upper floor")) # TODO: figure out block data for upside down stairs and use this instead of support block builds.append( BuildingBlock(ApartmentBlock.CORNER_POS['South East'] + Vec3(-7 + i, i, 1), block.WOOD_PLANKS, description="stair support")) self._add_section("Stairs to 2nd floor", builds) ####################################################################### if DO_2ND_FLOOR_RAILINGS: # 2nd floor walkway railings (should extend these out by 1 block all around so walkway is 2 blocks wide) # west side railings builds.append( BuildingBlock( ApartmentBlock.CORNER_POS['North West'] + Vec3(0, 5, 0), block.FENCE, ApartmentBlock.CORNER_POS['South West'] + Vec3(0, 5, 0), description="Balcony railings")) # close off west side railings on north end builds.append( BuildingBlock(ApartmentBlock.CORNER_POS['North West'] + Vec3(1, 5, 0), block.FENCE, description="Balcony railings")) # east side railings builds.append( BuildingBlock( ApartmentBlock.CORNER_POS['North East'] + Vec3(0, 5, 0), block.FENCE, ApartmentBlock.CORNER_POS['South East'] + Vec3(0, 5, 0), description="Balcony railings")) # close off east side railings on north end builds.append( BuildingBlock(ApartmentBlock.CORNER_POS['North East'] + Vec3(-1, 5, 0), block.FENCE, description="Balcony railings")) # south balcony railings builds.append( BuildingBlock( ApartmentBlock.CORNER_POS['South East'] + Vec3(0, 5, 0), block.FENCE, ApartmentBlock.CORNER_POS['South East'] + Vec3(-5, 5, 0), description="Balcony railings")) builds.append( BuildingBlock( ApartmentBlock.CORNER_POS['South West'] + Vec3(0, 5, 0), block.FENCE, ApartmentBlock.CORNER_POS['South West'] + Vec3(6, 5, 0), description="Balcony railings")) self._add_section("2nd floor railings", builds) ####################################################################### # Add the streets between as subbuildings street_ew = Street(9, Building.WEST) street_ns = Street(8, Building.NORTH) builds.append( SubBuilding(street_ew, Building.SE_CORNER_POS + Vec3(0, 0, 1))) builds.append( SubBuilding(street_ew, Building.SE_CORNER_POS + Vec3(0, 0, -24))) builds.append( SubBuilding(street_ns, Building.SE_CORNER_POS + Vec3(-13, 0, 0))) self._add_section("Streets", builds) ####################################################################### # Add the farm subbuildings farms = [Farm(Building.WEST), LargeFarm(Building.NORTH)] for pos in ApartmentBlock.WEST_FARMS_POS: builds.append(SubBuilding(farms[0], pos)) self._add_section("West Farms", builds) for pos in ApartmentBlock.NORTH_FARMS_POS: builds.append(SubBuilding(farms[1], pos)) self._add_section("North Double Farms", builds) ####################################################################### self._set_orientation()
def _create_structure(self): super(DiningHall, self)._create_structure() # create walls builds = [] builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['South East'], EXTERIOR_WALLS, DiningHall.WALLS_CORNER_POS['North West'] + Vec3(0,WALL_HEIGHT,0), description="Wall fill")) builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['South East'] + Vec3(-1,0,-1), HALL_FACIA, DiningHall.WALLS_CORNER_POS['North West'] + Vec3(1,WALL_HEIGHT,1), description="facia fill")) builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['South East'] + Vec3(-2,0,-2), block.AIR, DiningHall.WALLS_CORNER_POS['North West'] + Vec3(2,WALL_HEIGHT,2), description="clear interior")) builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['South East'] + Vec3(-1,-1,-1), HALL_FLOOR, DiningHall.WALLS_CORNER_POS['North West'] + Vec3(1,-1,1), description="floor")) self._add_section("Dining Hall shell", builds) # create doors & windows for span in DiningHall.MAIN_DOOR_SPANS: builds.append(BuildingBlock(span[0], block.AIR, span[1], description="Clear door")) builds.append(Torch(Vec3(span[0].x + 1, 2, -2), block.TORCH.withData(Torch.NORTH))) builds.append(Torch(Vec3(span[1].x - 1, 2, -2), block.TORCH.withData(Torch.NORTH))) builds.append(BuildingBlock(DiningHall.KITCHEN_DOOR[0], block.AIR, DiningHall.KITCHEN_DOOR[1], description="Clear door")) builds.append(Torch(Vec3(DiningHall.KITCHEN_DOOR[0].x, 2, -2), block.TORCH.withData(Torch.NORTH))) for x in range(5,25,4): builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['North East'] + Vec3(-x,1,0), block.AIR, DiningHall.WALLS_CORNER_POS['North East'] + Vec3(-x,2,1), description="Clear window")) builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['North East'] + Vec3(-x,1,0), block.GLASS_PANE, DiningHall.WALLS_CORNER_POS['North East'] + Vec3(-x,2,0), description="Window pane")) if x < 20: # add torches between windows. builds.append(Torch(DiningHall.WALLS_CORNER_POS['North East'] + Vec3(-x - 2,2,2), block.TORCH.withData(Torch.SOUTH))) builds.append(Door(Door.HINGE_RIGHT, DiningHall.MAIN_DOOR_SPANS[0][0] + Vec3(0,0,-1), block.DOOR_WOOD.withData(Door.SOUTH), description="Door")) builds.append(Door(Door.HINGE_LEFT, DiningHall.MAIN_DOOR_SPANS[0][0] + Vec3(-1,0,-1), block.DOOR_WOOD.withData(Door.SOUTH), description="Door")) builds.append(Door(Door.HINGE_RIGHT, DiningHall.MAIN_DOOR_SPANS[1][0] + Vec3(0,0,-1), block.DOOR_WOOD.withData(Door.SOUTH), description="Door")) builds.append(Door(Door.HINGE_LEFT, DiningHall.MAIN_DOOR_SPANS[1][0] + Vec3(-1,0,-1), block.DOOR_WOOD.withData(Door.SOUTH), description="Door")) builds.append(Door(Door.HINGE_LEFT, DiningHall.KITCHEN_DOOR[0] + Vec3(0,0,-1), block.DOOR_WOOD.withData(Door.SOUTH), description="Door")) self._add_section("Dining Hall doors, windows & torches", builds) # add table & chairs builds.append(BuildingBlock(DiningHall.TABLE_SPAN[0], block.FENCE, DiningHall.TABLE_SPAN[1], description="Table base")) builds.append(BuildingBlock(DiningHall.TABLE_SPAN[0] + Vec3(0,1,0), TABLE_TOP, DiningHall.TABLE_SPAN[1] + Vec3(0,1,0), description="Table top")) # chairs & table place settings for pos, orientation, place_offset in DiningHall.CHAIR_POS: builds.append(Stair(pos, block.STAIRS_WOOD.withData(orientation), description="Chair")) builds.append(BuildingBlock(pos + place_offset, TABLE_PLACE, description="Table place setting")) self._add_section("Dining Hall Table", builds) # add fireplaces builds.append(SubBuilding(Fireplace(Building.EAST), DiningHall.FIREPLACE_POS[0])) builds.append(SubBuilding(Fireplace(Building.WEST), DiningHall.FIREPLACE_POS[1])) self._add_section("Dining Hall Fireplaces", builds) # add book shelves builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['South East'] + Vec3(-2, 0, -2), block.BOOKSHELF, DiningHall.WALLS_CORNER_POS['South East'] + Vec3(-2, 2, -4), description="South East bookshelves")) builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['South West'] + Vec3(2, 0, -2), block.BOOKSHELF, DiningHall.WALLS_CORNER_POS['South West'] + Vec3(2, 2, -4), description="South West bookshelves")) builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 2), block.BOOKSHELF, DiningHall.WALLS_CORNER_POS['North West'] + Vec3(2, 2, 4), description="North West bookshelves")) builds.append(BuildingBlock(DiningHall.WALLS_CORNER_POS['North East'] + Vec3(-2, 0, 2), block.BOOKSHELF, DiningHall.WALLS_CORNER_POS['North East'] + Vec3(-2, 2, 4), description="North East bookshelves")) self._add_section("Dining Hall Bookshelves", builds)
def _create_structure(self): super(Kitchen, self)._create_structure() builds = [] ############################################################################ # Open arched doorways builds.append(SubBuilding(OpenDoorway(Building.NORTH), Building.SE_CORNER_POS + Vec3(-3,0,0))) builds.append(SubBuilding(OpenDoorway(Building.EAST), Kitchen.WALLS_CORNER_POS['South West'] + Vec3(0,0,-2))) # window & door across corridor to dining hall #builds.append(BuildingBlock(Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-2,1,0), # block.GLASS_PANE, # Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-5,1,0), # description="Window")) builds.append(Door(Door.HINGE_RIGHT, Kitchen.WALLS_CORNER_POS['South East'] + Vec3(0,0,-2), block.DOOR_WOOD.withData(Door.EAST), description="Door")) self._add_section("Kitchen Doorways", builds) ############################################################################ # TODO: add fittings builds.append(BuildingBlock(Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-2,0,1), block.STONE_BRICK, Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-1,0,4), description="Well wall")) builds.append(BuildingBlock(Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-1,0,1), block.WATER, Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-1,0,3), description="Well water")) builds.append(BuildingBlock(Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-3,0,1), block.WOOD_PLANKS, description="counter")) builds.append(BuildingBlock(Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-4,0,1), CAULDRON, description="sink")) builds.append(BuildingBlock(Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-5,0,1), block.CRAFTING_TABLE, description="crafting table")) builds.append(BuildingBlock(Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-6,0,1), block.WOOD_PLANKS, description="counter")) builds.append(Furnace(Kitchen.WALLS_CORNER_POS['North West'] + Vec3(1,0,2), block.FURNACE_INACTIVE.withData(Furnace.EAST), description="range")) builds.append(Furnace(Kitchen.WALLS_CORNER_POS['North West'] + Vec3(1,0,3), block.FURNACE_INACTIVE.withData(Furnace.EAST), description="range")) builds.append(Chest(Kitchen.WALLS_CORNER_POS['South East'] + Vec3(-1,0,-1), block.CHEST.withData(Chest.EAST), Kitchen.WALLS_CORNER_POS['South East'] + Vec3(-2,1,-1), description="Chest")) builds.append(Chest(Kitchen.WALLS_CORNER_POS['South West'] + Vec3(1,0,-1), block.CHEST.withData(Chest.EAST), Kitchen.WALLS_CORNER_POS['South West'] + Vec3(2,1,-1), description="Chest")) self._add_section("Kitchen Fittings", builds) ############################################################################ #torches, # south wall torches either side of arched doorway builds.append(Torch(Kitchen.WALLS_CORNER_POS['South East'] + Vec3(-2,2,-1), block.TORCH.withData(Torch.NORTH))) builds.append(Torch(Kitchen.WALLS_CORNER_POS['South West'] + Vec3(2,2,-1), block.TORCH.withData(Torch.NORTH))) # torches in north east corner on north & east walls builds.append(Torch(Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-2,2,1), block.TORCH.withData(Torch.SOUTH))) builds.append(Torch(Kitchen.WALLS_CORNER_POS['North East'] + Vec3(-1,2,2), block.TORCH.withData(Torch.WEST))) # torches in north west corner on north & west walls. builds.append(Torch(Kitchen.WALLS_CORNER_POS['North West'] + Vec3(2,2,1), block.TORCH.withData(Torch.SOUTH))) # this is only torch on west wall, move closer to center builds.append(Torch(Kitchen.WALLS_CORNER_POS['North West'] + Vec3(1,2,3), block.TORCH.withData(Torch.EAST))) # torch over doorway to corridor builds.append(Torch(Kitchen.WALLS_CORNER_POS['South East'] + Vec3(-1,2,-2), block.TORCH.withData(Torch.WEST))) self._add_section("Kitchen Torches", builds)