def _create_upper_floor_and_main_staircase(self): builds = [] # after applying 2nd storey floor, add main stairs builds.append(SubBuilding(UpperFloor(Building.NORTH), Castle.WALLS_CORNER_POS['South East'] + Vec3(0,self.upper_floor_level,0))) builds.append(SubBuilding(MainStairs(Building.NORTH), Castle.WALLS_CORNER_POS['South East'] + Vec3(-11,0,-10))) self._add_section("Upper floor & staircase", 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 _create_moat(self): builds = [] ne_moat = WallTurretMoat(Building.NORTH) ne_moat.open_se_wall() builds.append( SubBuilding(ne_moat, self.column_se_corner + Vec3(4, 0, -4))) nw_moat = WallTurretMoat(Building.WEST) nw_moat.open_nw_wall() builds.append( SubBuilding(nw_moat, self.column_se_corner + Vec3(-4, 0, -11))) self._add_section("Straight Turret - moat", builds)
def _create_second_floor_rooms(self): builds = [] builds.append(SubBuilding(StoreRoom(Building.WEST), Castle.WALLS_CORNER_POS['South East'] + Vec3(-20,self.second_storey_level,-17))) builds.append(SubBuilding(DyeRoom(Building.EAST), Castle.WALLS_CORNER_POS['South East'] + Vec3(-7,self.second_storey_level,-3))) builds.append(SubBuilding(Brewery(Building.EAST), Castle.WALLS_CORNER_POS['South East'] + Vec3(-7,self.second_storey_level,-10))) builds.append(SubBuilding(CraftingRoom(Building.SOUTH), Castle.WALLS_CORNER_POS['South East'] + Vec3(-17,self.second_storey_level,-7))) builds.append(SubBuilding(Bedroom(Building.NORTH), Castle.WALLS_CORNER_POS['South East'] + Vec3(-3,self.second_storey_level,-20))) self._add_section("Second storey rooms", builds)
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_ground_floor_rooms(self): builds = [] builds.append(SubBuilding(DiningHall(Building.NORTH), Castle.WALLS_CORNER_POS['South East'] + Vec3(0,0,-16))) builds.append(SubBuilding(Kitchen(Building.WEST), Castle.WALLS_CORNER_POS['South East'] + Vec3(-20,0,-14))) builds.append(SubBuilding(Pantry(Building.WEST), Castle.WALLS_CORNER_POS['South East'] + Vec3(-20,0,-7))) builds.append(SubBuilding(EnchantingRoom(Building.EAST), Castle.WALLS_CORNER_POS['South East'] + Vec3(-7,0,-7))) builds.append(SubBuilding(Smithy(Building.EAST), Castle.WALLS_CORNER_POS['South East'] + Vec3(-7,0,0))) self._add_section("Ground floor rooms", builds)
def _create_moat(self): builds = [] if not self.mirrored: builds.append( SubBuilding(WallTurretMoat(Building.NORTH), self.column_se_corner + Vec3(4, 0, -4))) nw_moat = WallTurretMoat(Building.WEST) nw_moat.open_nw_wall() builds.append( SubBuilding(nw_moat, self.column_se_corner + Vec3(-4, 0, -11))) se_moat = WallTurretMoat(Building.EAST) se_moat.open_se_wall() builds.append( SubBuilding(se_moat, self.column_se_corner + Vec3(-3, 0, 4))) else: builds.append( SubBuilding(WallTurretMoat(Building.WEST), self.column_se_corner + Vec3(-4, 0, -11))) ne_moat = WallTurretMoat(Building.NORTH) ne_moat.open_se_wall() builds.append( SubBuilding(ne_moat, self.column_se_corner + Vec3(4, 0, -4))) sw_moat = WallTurretMoat(Building.SOUTH) sw_moat.open_nw_wall() builds.append( SubBuilding(sw_moat, self.column_se_corner + Vec3(-11, 0, -3))) self._add_section("Corner Turret - moat", builds)
def _create_second_floor_turrets(self): builds = [] nw_turret = Turret(Building.NORTH) nw_turret.set_access_enclosure_material(block.STONE_BRICK) builds.append(SubBuilding(nw_turret, Castle.WALLS_CORNER_POS['North West'] + Vec3(3,self.second_storey_level,3))) ne_turret = Turret(Building.NORTH) ne_turret.set_access_enclosure_material(block.STONE_BRICK) ne_turret.mirror() builds.append(SubBuilding(ne_turret, Castle.WALLS_CORNER_POS['North East'] + Vec3(3,self.second_storey_level,3))) sw_turret = Turret(Building.WEST) sw_turret.set_access_enclosure_material(block.STONE_BRICK) builds.append(SubBuilding(sw_turret, Castle.WALLS_CORNER_POS['South West'] + Vec3(3,self.second_storey_level,-3))) se_turret = Turret(Building.EAST) se_turret.set_access_enclosure_material(block.STONE_BRICK) se_turret.mirror() builds.append(SubBuilding(se_turret, Castle.WALLS_CORNER_POS['South East'] + Vec3(-3,self.second_storey_level,3))) self._add_section("Turrets", 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 _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 _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 _create_second_floor(self): # first story # - master bedroom # - 2 beds surrounded by fence posts with pressure plates & carpet on top for 4 poster # - chest at end of bed # => 4x4 area for bed + 2 minimum all round # - fireplace # - store room (non food) # - Sell-able stuff (near door, beside armory) # - wheat, potato, carrots # - string, coal, wool, # - paper, books # - rotten meat # - raw pork, raw chicken # - leather. # - building material # - crafting room, close to store # - smelting room - will need to be 6 high # - brewery # - dye room # 2nd floor plan: # ssssssggssggssssggssggssssss 9 # s twb T ffff T bwt s 8 # s wb ffff bw s 7 side walls lined with book shelves # swdwb c ffff c bwdws 6 c => chair # g twb bwt g 5 # s wT fccf Tw s 4 fences posts 3 high around bed, wood slabs on top? # s wt bb cw s 3 t=> table, c=> chair # g wtc bb cw g 2 desk & chairs one side, sofa on the other? # s wt T f f T w s 1 # s wwwwwwddwwwwwwddwwwwww s 02 TODO: move doors # g t t g 9 # s t t s 8 # swwwwwww wwwwwwws 7 # g + +ffff+ + g 6 + => supporting post based on stone wall below # s wt xxwwxx tw s 5 # g w xxwwxx w g 4 # g storew f f w brew g 3 # s d f f d s 2 # g d f f d g 1 # swwwwwwwt ffffffff twwwwwwws 01 # g d d g 9 # s d t t d s 8 # g + w+wddw+w + g 7 + => supporting post based on stone wall below # g smeltw w w w dye g 6 # s wt w w tw s 5 # g w w craftw w g 4 # swwwwwww w w wwwwwwws 3 - posts on corners here would be over door arches below # st d tw wt d ts 2 # s wt w w tw s 1 # sssssgssgssgsggsgssgssgsssss 0 # 7654321098765432109876543210 # 2 1 self._create_second_floor_skeleton() self._create_second_floor_rooms() builds = [] builds.append(SubBuilding(Roof(Building.NORTH), Castle.WALLS_CORNER_POS['South East'] + Vec3(0,self.ceiling_level,0))) self._add_section("Roof", builds) # smelting room need to be added after roof to take some space from ceiling & floor to accomodate hopper fed furnaces builds.append(SubBuilding(SmeltingRoom(Building.WEST), Castle.WALLS_CORNER_POS['South East'] + Vec3(-20,self.second_storey_level,-10))) self._add_section("Smelting Room", builds) self._create_second_floor_turrets() self._create_second_floor_fittings()
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)