From 4056807caa7558900f7d170fea412d70b858fad6 Mon Sep 17 00:00:00 2001 From: Eclairsombre Date: Sat, 15 Jun 2024 14:59:33 +0200 Subject: [PATCH] build function --- House.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/House.py b/House.py index 0663dc7..7592325 100644 --- a/House.py +++ b/House.py @@ -873,6 +873,21 @@ class House: else: self.editor.placeBlock((i, y_min-1, y), self.garden_floor) + + + def build(self): + house.createHouseSkeleton() + house.putWallOnSkeleton() + house.placeDoor() + house.placeRoof() + house.putCelling() + house.placeWindow() + house.placeEntrance() + house.placeGardenOutline() + if house.nbEtage > 1: + house.placeStairs() + + if __name__ == "__main__": editor = Editor(buffering=True) buildArea = editor.getBuildArea() @@ -898,21 +913,7 @@ if __name__ == "__main__": for i in range(1): house = House(editor, coordinates_min, coordinates_max,"W", blocks) - house.createHouseSkeleton() - house.putWallOnSkeleton() - print("House n°", i+1, "created") - print('-----------------------------------') - print(house.getAdjacentWalls()) - house.placeDoor() - house.placeRoof() - house.putCelling() - - house.placeWindow() - house.placeEntrance() - house.placeGardenOutline() - - if house.nbEtage > 1: - house.placeStairs() + house.build() new_coordinates_min =(coordinates_max[0] + 10, coordinates_min[1], coordinates_min[2]) new_coordinates_max = (coordinates_max[0] + 10 +24, coordinates_max[1], coordinates_max[2])