From f912fa61b2d8934cae259960fe6c82ffecc4d1fa Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Sun, 23 Jan 2022 07:01:03 +0300 Subject: [PATCH] Fix building foundations. --- map_machine/constructor.py | 2 +- map_machine/feature/building.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/map_machine/constructor.py b/map_machine/constructor.py index 599af02..ad0dff1 100644 --- a/map_machine/constructor.py +++ b/map_machine/constructor.py @@ -189,7 +189,7 @@ class Constructor: self.craters: list[Crater] = [] self.direction_sectors: list[DirectionSector] = [] - self.heights: set[float] = {2.0, 4.0} + self.heights: set[float] = {1.0, 2.0} def add_building(self, building: Building) -> None: """Add building and update levels.""" diff --git a/map_machine/feature/building.py b/map_machine/feature/building.py index a188a3a..f274a1d 100644 --- a/map_machine/feature/building.py +++ b/map_machine/feature/building.py @@ -118,9 +118,9 @@ class Building(Figure): shift_2: np.ndarray = np.array((0.0, -height * scale)) for segment in self.parts: fill: Color - if height == 2.0: + if height <= 1.0: fill = self.wall_bottom_color_1 - elif height == 4.0: + elif height <= 2.0: fill = self.wall_bottom_color_2 else: color_part: float = self.wall_color_start + segment.angle * 0.2