Fix building foundations.

This commit is contained in:
Sergey Vartanov 2022-01-23 07:01:03 +03:00
parent aada02ee0b
commit f912fa61b2
2 changed files with 3 additions and 3 deletions

View file

@ -189,7 +189,7 @@ class Constructor:
self.craters: list[Crater] = [] self.craters: list[Crater] = []
self.direction_sectors: list[DirectionSector] = [] 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: def add_building(self, building: Building) -> None:
"""Add building and update levels.""" """Add building and update levels."""

View file

@ -118,9 +118,9 @@ class Building(Figure):
shift_2: np.ndarray = np.array((0.0, -height * scale)) shift_2: np.ndarray = np.array((0.0, -height * scale))
for segment in self.parts: for segment in self.parts:
fill: Color fill: Color
if height == 2.0: if height <= 1.0:
fill = self.wall_bottom_color_1 fill = self.wall_bottom_color_1
elif height == 4.0: elif height <= 2.0:
fill = self.wall_bottom_color_2 fill = self.wall_bottom_color_2
else: else:
color_part: float = self.wall_color_start + segment.angle * 0.2 color_part: float = self.wall_color_start + segment.angle * 0.2