Skip to content
Snippets Groups Projects
Commit bb80d0b1 authored by Fabian Heinrich's avatar Fabian Heinrich
Browse files

Temporary fix for drawing rotated cutting board and sink, ...

parent a3749292
No related branches found
No related tags found
No related merge requests found
Pipeline #45570 passed
...@@ -335,12 +335,15 @@ class Visualizer: ...@@ -335,12 +335,15 @@ class Visualizer:
angle = calc_angle(orientation, [0, 1]) angle = calc_angle(orientation, [0, 1])
else: else:
angle = angle_offset angle = angle_offset
# if "rotate_offset" in part.keys():
# angle_offset = 0
match part_type: match part_type:
case "image": case "image":
if "center_offset" in part: if "center_offset" in part:
d = pygame.math.Vector2(part["center_offset"]) * grid_size d = pygame.math.Vector2(part["center_offset"]) * grid_size
d.rotate_ip(angle_offset) d.rotate_ip(angle_offset)
d[0] = -d[0]
draw_pos += np.array(d) draw_pos += np.array(d)
self.draw_image( self.draw_image(
screen, screen,
......
...@@ -35,7 +35,7 @@ CuttingBoard: ...@@ -35,7 +35,7 @@ CuttingBoard:
- type: image - type: image
path: images/cutting_board_large.png path: images/cutting_board_large.png
size: 0.75 size: 0.75
center_offset: [ 0, 0.05 ] center_offset: [ 0, -0.05 ]
PlateDispenser: PlateDispenser:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment