def _create_ground_floor_skeleton(self): builds = [] builds.append(SubBuilding(GroundFloor(Building.NORTH), Castle.WALLS_CORNER_POS['South East'])) self._add_section("Floor", builds) self._create_surrounding_walls("Ground floor enclosing walls", 0) # Side doors builds.append(Door(Door.HINGE_LEFT, Castle.WALLS_CORNER_POS['South East'] + Vec3(0,0,-15), block.DOOR_WOOD.withData(Door.EAST), description="East side door")) builds.append(Door(Door.HINGE_RIGHT, Castle.WALLS_CORNER_POS['South West'] + Vec3(0,0,-15), block.DOOR_WOOD.withData(Door.WEST), description="West side door")) # Front wall & door builds.append(Door(Door.HINGE_RIGHT, Castle.WALLS_CORNER_POS['South East'] + Vec3(-13,0,0), block.DOOR_WOOD.withData(Door.SOUTH), description="Front door")) builds.append(Door(Door.HINGE_LEFT, Castle.WALLS_CORNER_POS['South East'] + Vec3(-14,0,0), block.DOOR_WOOD.withData(Door.SOUTH), description="Front door")) self._add_section("Ground floor external doors", builds)
def _create_walls_and_doors(self): builds = [] builds.append(BuildingBlock(Bedroom.WALLS_CORNER_POS['South East'], INTERIOR_WALLS, Bedroom.WALLS_CORNER_POS['South West'] + Vec3(0,WALL_HEIGHT,0), description="Bedroom south wall")) builds.append(BuildingBlock(Bedroom.WALLS_CORNER_POS['South West'], INTERIOR_WALLS, Bedroom.WALLS_CORNER_POS['North West'] + Vec3(0,WALL_HEIGHT,1), description="Bedroom west wall")) builds.append(BuildingBlock(Bedroom.WALLS_CORNER_POS['South East'], INTERIOR_WALLS, Bedroom.WALLS_CORNER_POS['North East'] + Vec3(0,WALL_HEIGHT,1), description="Bedroom east wall")) builds.append(Door(Door.HINGE_RIGHT, Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-6,0,0), block.DOOR_WOOD.withData(Door.SOUTH), description="Bedroom door")) builds.append(Door(Door.HINGE_LEFT, Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-7,0,0), block.DOOR_WOOD.withData(Door.SOUTH), description="Bedroom door")) builds.append(Door(Door.HINGE_RIGHT, Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-14,0,0), block.DOOR_WOOD.withData(Door.SOUTH), description="Bedroom door")) builds.append(Door(Door.HINGE_LEFT, Bedroom.WALLS_CORNER_POS['South East'] + Vec3(-15,0,0), block.DOOR_WOOD.withData(Door.SOUTH), description="Bedroom door")) self._add_section("Bedroom shell", builds)
def _create_structure(self): super(Brewery, self)._create_structure() builds = [] builds.append( Door(Door.HINGE_RIGHT, UpperRoomBase.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0), block.DOOR_WOOD.withData(Door.SOUTH), description="Brewery room door")) builds.append( Door(Door.HINGE_LEFT, UpperRoomBase.WALLS_CORNER_POS['South East'] + Vec3(-2, 0, 0), block.DOOR_WOOD.withData(Door.SOUTH), description="Brewery room door")) self._add_section("Brewery doors", builds)
def _create_turret_access(self): builds = [] builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(0), 0, 0), block.STONE_BRICK, self.column_se_corner + Vec3(self._get_x(-1), 3, -1), description="turret access point")) builds.append( BuildingBlock(self.column_se_corner + Vec3(self._get_x(-1), 0, -1), block.AIR, self.column_se_corner + Vec3(self._get_x(-2), 2, -3), description="turret acces clearance")) hinge_type = Door.HINGE_LEFT door_orientation = Door.EAST if self.mirrored: hinge_type = Door.HINGE_RIGHT door_orientation = Door.WEST # Place door on east wall of access point, so doorways either side of gate face each other # this will probably be usefull if i have to leave assess between animal pens on east wall builds.append( Door(Door.hinge_type, self.column_se_corner + Vec3(self._get_x(0), 0, -1), block.DOOR_WOOD.withData(door_orientation), description="Turret access door")) self._add_section("Straight Turret access", builds)
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_interior_enclosure(self): builds = [] builds.append(BuildingBlock(Building.SE_CORNER_POS + Vec3(self._get_x(0),0,0), self.access_enclosure, Building.SE_CORNER_POS + Vec3(self._get_x(-2),WALL_HEIGHT,0), description="turret interior wall")) builds.append(BuildingBlock(Building.SE_CORNER_POS + Vec3(self._get_x(0),0,0), self.access_enclosure, Building.SE_CORNER_POS + Vec3(self._get_x(0),WALL_HEIGHT,-2), description="turret interior wall")) hinge_type = Door.HINGE_LEFT if self.mirrored: hinge_type = Door.HINGE_RIGHT builds.append(Door(hinge_type, Building.SE_CORNER_POS + Vec3(self._get_x(-1),0,0), block.DOOR_WOOD.withData(Door.SOUTH), description="Turret access door")) self._add_section("Turret interior enclosure", builds)
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 __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 __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 __init__(self, *args, **kwargs): super(Library, self).__init__(width=Library.WIDTH, *args, **kwargs) layer_blocks = [] ######################################################################## # level 1 layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['South West'], block.COBBLESTONE, Library.WALLS_CORNER_POS['North East'], description="Floor")) layer_blocks.append( Stair(Library.DOOR_POS + Vec3(0, 0, 1), block.STAIRS_COBBLESTONE.withData(Stair.NORTH), description="Front door step")) self.add_layer(BuildingLayer(layer_blocks, 0)) del layer_blocks[:] ######################################################################## # level 2 layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['South West'], block.COBBLESTONE, Library.WALLS_CORNER_POS['North West'], description="West wall")) layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['North West'], block.COBBLESTONE, Library.WALLS_CORNER_POS['North East'], description="North wall")) layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['North East'], block.COBBLESTONE, Library.WALLS_CORNER_POS['South East'], description="East wall")) layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['South East'], block.COBBLESTONE, Library.WALLS_CORNER_POS['South West'], description="South wall")) # Clear door space layer_blocks.append( BuildingBlock(Library.DOOR_POS, block.AIR, description="Clear door")) # seats corner layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1), block.WOOD_PLANKS, description="seat corner")) # seats layer_blocks.append( Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 2), block.STAIRS_WOOD.withData(Stair.WEST), description="west seat")) layer_blocks.append( Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(2, 0, 1), block.STAIRS_WOOD.withData(Stair.NORTH), Library.WALLS_CORNER_POS['North West'] + Vec3(5, 0, 1), description="north seats")) # table bases layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['South West'] + Vec3(2, 0, -3), block.FENCE, description="table base")) layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['South West'] + Vec3(4, 0, -3), block.FENCE, description="table base")) layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['South West'] + Vec3(1, 0, -1), block.CRAFTING_TABLE, description="crafting table")) self.add_layer(BuildingLayer(layer_blocks, 1)) del layer_blocks[:] ######################################################################## # Common sets of blocks corners = [] for key, pos in Library.WALLS_CORNER_POS.items(): corners.append( BuildingBlock(pos, block.COBBLESTONE, description=key + " corner")) # north windows are only used on 1 layer, # east, south & west are used on 2 levels other_windows = [] for key, span in Library.OTHER_WIN_SPANS.items(): other_windows.append( BuildingBlock(span[0], block.GLASS_PANE, span[1], description=key + " window")) # these walls are used on 3 levels walls = [] walls.append( BuildingBlock( Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), block.WOOD_PLANKS, Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1), description="West wall")) walls.append( BuildingBlock( Library.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 0), block.WOOD_PLANKS, Library.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 0), description="North wall")) walls.append( BuildingBlock( Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1), block.WOOD_PLANKS, Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), description="East wall")) walls.append( BuildingBlock( Library.WALLS_CORNER_POS['South East'] + Vec3(-1, 0, 0), block.WOOD_PLANKS, Library.WALLS_CORNER_POS['South West'] + Vec3(1, 0, 0), description="South wall")) ######################################################################## # level 3 # corners & walls layer_blocks.extend(corners) layer_blocks.extend(walls) # north windows for key, span in Library.NORTH_WIN_SPANS.items(): layer_blocks.append( BuildingBlock(span[0], block.GLASS_PANE, span[1], description=key + " window")) # other windows layer_blocks.extend(other_windows) # Clear door space layer_blocks.append( BuildingBlock(Library.DOOR_POS, block.AIR, description="clear door")) # table bases layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['South West'] + Vec3(2, 0, -3), TABLE_TOP, description="table top")) layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['South West'] + Vec3(4, 0, -3), TABLE_TOP, description="table top")) self.add_layer(BuildingLayer(layer_blocks, 2)) del layer_blocks[:] ######################################################################## # level 4 # corners & walls layer_blocks.extend(corners) layer_blocks.extend(walls) # books layer_blocks.append( BuildingBlock( Library.WALLS_CORNER_POS['North West'] + Vec3(1, 0, 1), block.BOOKSHELF, Library.WALLS_CORNER_POS['North East'] + Vec3(-1, 0, 1), description="Book shelves")) # other windows layer_blocks.extend(other_windows) self.add_layer(BuildingLayer(layer_blocks, 3)) del layer_blocks[:] ######################################################################## # level 5 # corners & walls layer_blocks.extend(corners) layer_blocks.extend(walls) layer_blocks.append( BuildingBlock( Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1), block.WOOD_PLANKS, Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1), description="North rafters")) layer_blocks.append( BuildingBlock( Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), block.WOOD_PLANKS, Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), description="South rafters")) self.add_layer(BuildingLayer(layer_blocks, 4)) del layer_blocks[:] ######################################################################## # level 6 layer_blocks.append( BuildingBlock(Library.WALLS_CORNER_POS['South West'], block.COBBLESTONE, Library.WALLS_CORNER_POS['North East'], description="Ceiling")) # north and south roof eaves layer_blocks.append( Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, -1), block.STAIRS_WOOD.withData(Stair.SOUTH), Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, -1), description="North roof eaves")) layer_blocks.append( Stair(Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, 1), block.STAIRS_WOOD.withData(Stair.NORTH), Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, 1), description="South roof eaves")) self.add_layer(BuildingLayer(layer_blocks, 5)) del layer_blocks[:] ######################################################################## # level 7 layer_blocks.append( BuildingBlock( Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), block.COBBLESTONE, Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1), description="Ceiling")) # north and south roof eaves layer_blocks.append( Stair(Library.WALLS_CORNER_POS['North West'], block.STAIRS_WOOD.withData(Stair.SOUTH), Library.WALLS_CORNER_POS['North East'], description="North roof eaves")) layer_blocks.append( Stair(Library.WALLS_CORNER_POS['South East'], block.STAIRS_WOOD.withData(Stair.NORTH), Library.WALLS_CORNER_POS['South West'], description="South roof eaves")) self.add_layer(BuildingLayer(layer_blocks, 6)) del layer_blocks[:] ######################################################################## # level 8 # TODO: adjust positsions layer_blocks.append( BuildingBlock( Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2), block.COBBLESTONE, Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 2), description="Ceiling")) # north and south roof eaves layer_blocks.append( Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 1), block.STAIRS_WOOD.withData(Stair.SOUTH), Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 1), description="North roof eaves")) layer_blocks.append( Stair(Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -1), block.STAIRS_WOOD.withData(Stair.NORTH), Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -1), description="South roof eaves")) self.add_layer(BuildingLayer(layer_blocks, 7)) del layer_blocks[:] ######################################################################## # level 9 # TODO: adjust positsions # north and south roof eaves layer_blocks.append( Stair(Library.WALLS_CORNER_POS['North West'] + Vec3(0, 0, 2), block.STAIRS_WOOD.withData(Stair.SOUTH), Library.WALLS_CORNER_POS['North East'] + Vec3(0, 0, 2), description="North roof eaves")) layer_blocks.append( Stair(Library.WALLS_CORNER_POS['South East'] + Vec3(0, 0, -2), block.STAIRS_WOOD.withData(Stair.NORTH), Library.WALLS_CORNER_POS['South West'] + Vec3(0, 0, -2), description="South roof eaves")) self.add_layer(BuildingLayer(layer_blocks, 8)) del layer_blocks[:] ######################################################################## # add the door self.add_block( Door(Door.HINGE_LEFT, Vec3(Library.DOOR_POS.x, 1, Library.DOOR_POS.z), block.DOOR_WOOD.withData(Door.SOUTH))) self._set_orientation()
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 __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_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)