diff --git a/overcooked_simulator/gui_2d_vis/images/bun.png b/overcooked_simulator/gui_2d_vis/images/bun.png new file mode 100644 index 0000000000000000000000000000000000000000..2c2f180610dbfd664acb61d2d733d7a3df75e2e5 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/bun.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/cooked_patty.png b/overcooked_simulator/gui_2d_vis/images/cooked_patty.png new file mode 100644 index 0000000000000000000000000000000000000000..3d5b9270e569211eca7e971b21e8e9db944ac9bc Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/cooked_patty.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/cutting_board_large.png b/overcooked_simulator/gui_2d_vis/images/cutting_board_large.png new file mode 100644 index 0000000000000000000000000000000000000000..8f50132ce6b8646ec1f35f1599c7210f7d0e1c4f Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/cutting_board_large.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/lettuce_cut_smaller.png b/overcooked_simulator/gui_2d_vis/images/lettuce_cut_smaller.png new file mode 100644 index 0000000000000000000000000000000000000000..0fc897f72a779a998a264fce5ed4363bd8813d32 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/lettuce_cut_smaller.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/lettuce_smaller.png b/overcooked_simulator/gui_2d_vis/images/lettuce_smaller.png new file mode 100644 index 0000000000000000000000000000000000000000..6c0abbda27f4ac859d8965d8c0828d0685277c08 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/lettuce_smaller.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/meat.png b/overcooked_simulator/gui_2d_vis/images/meat.png new file mode 100644 index 0000000000000000000000000000000000000000..ff750e1c4858d0bab5dd2434966ee38c7f88e085 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/meat.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/onion_cut.png b/overcooked_simulator/gui_2d_vis/images/onion_cut.png new file mode 100644 index 0000000000000000000000000000000000000000..f33ec9ab41c1aea7fbe6553891db86032346d29e Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/onion_cut.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/onion_large.png b/overcooked_simulator/gui_2d_vis/images/onion_large.png new file mode 100644 index 0000000000000000000000000000000000000000..dd70c1a5dd8a271c353909e4717ebe3629e80d54 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/onion_large.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/onion_soup_plate.png b/overcooked_simulator/gui_2d_vis/images/onion_soup_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..89a81f7b27509ce34005d3752949e1c4a1dd3084 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/onion_soup_plate.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/onion_soup_pot.png b/overcooked_simulator/gui_2d_vis/images/onion_soup_pot.png new file mode 100644 index 0000000000000000000000000000000000000000..35ee354b302c94fe9c70a3502a1ebbfd2616cb54 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/onion_soup_pot.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/pan.png b/overcooked_simulator/gui_2d_vis/images/pan.png new file mode 100644 index 0000000000000000000000000000000000000000..afb288156faee0fdbb6917de0b18e0e1b698862d Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/pan.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/pot_large.png b/overcooked_simulator/gui_2d_vis/images/pot_large.png new file mode 100644 index 0000000000000000000000000000000000000000..6c702693d5234eb32b148d68cce3024ce17d7aef Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/pot_large.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/pot_smaller.png b/overcooked_simulator/gui_2d_vis/images/pot_smaller.png new file mode 100644 index 0000000000000000000000000000000000000000..5f8d29c3f66beba620e518b09e210783ff43ebe1 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/pot_smaller.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/raw_patty.png b/overcooked_simulator/gui_2d_vis/images/raw_patty.png new file mode 100644 index 0000000000000000000000000000000000000000..85a42e2a04efbddf49c99e23705f192e7d089e3b Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/raw_patty.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/sink_large.png b/overcooked_simulator/gui_2d_vis/images/sink_large.png new file mode 100644 index 0000000000000000000000000000000000000000..0758d02bc6f4b2c80cfd4c984f8914b74bb0ff83 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/sink_large.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/tomato3_cut_smaller.png b/overcooked_simulator/gui_2d_vis/images/tomato3_cut_smaller.png new file mode 100644 index 0000000000000000000000000000000000000000..f9aabe95db07b439e5557f2811d83ff516d0c4aa Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/tomato3_cut_smaller.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/tomato3_smaller.png b/overcooked_simulator/gui_2d_vis/images/tomato3_smaller.png new file mode 100644 index 0000000000000000000000000000000000000000..64bc2f9a2a48e3ef85ddd5bd990fe38553b1f106 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/tomato3_smaller.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/tomato_soup_plate.png b/overcooked_simulator/gui_2d_vis/images/tomato_soup_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..006070021fc1c9ca3087309025bffe5d48083132 Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/tomato_soup_plate.png differ diff --git a/overcooked_simulator/gui_2d_vis/images/tomato_soup_pot.png b/overcooked_simulator/gui_2d_vis/images/tomato_soup_pot.png new file mode 100644 index 0000000000000000000000000000000000000000..70ea72b49ea7fc5916d4e1b11f81810f2f7bcfab Binary files /dev/null and b/overcooked_simulator/gui_2d_vis/images/tomato_soup_pot.png differ diff --git a/overcooked_simulator/gui_2d_vis/overcooked_gui.py b/overcooked_simulator/gui_2d_vis/overcooked_gui.py index 7c910c07f9b6fadfd571a64eaf6d4f606fee333f..1cae4e0dec3393dd1e8ae67af9085d876379489e 100644 --- a/overcooked_simulator/gui_2d_vis/overcooked_gui.py +++ b/overcooked_simulator/gui_2d_vis/overcooked_gui.py @@ -391,7 +391,9 @@ class PyGameGUI: else: pygame.draw.circle(self.game_screen, color, pos, radius) - def draw_item(self, pos: npt.NDArray[float], item: Item, scale: float = 1.0): + def draw_item( + self, pos: npt.NDArray[float], item: Item, scale: float = 1.0, plate=False + ): """Visualization of an item at the specified position. On a counter or in the hands of the player. The visual composition of the item is read in from visualization.yaml file, where it is specified as different parts to be drawn. @@ -412,12 +414,20 @@ class PyGameGUI: self.draw_progress_bar(pos, item.progressed_steps, item.steps_needed) if isinstance(item, CookingEquipment) and item.content: - self.draw_item(pos, item.content) + self.draw_item(pos, item.content, plate=isinstance(item, Plate)) if isinstance(item, Meal): if item.finished: if item.name in self.visualization_config: - self.draw_thing(pos, self.visualization_config[item.name]["parts"]) + if "Soup" in item.name and plate: + self.draw_thing( + pos, self.visualization_config[item.name + "Plate"]["parts"] + ) + else: + self.draw_thing( + pos, self.visualization_config[item.name]["parts"] + ) + else: for idx, o in enumerate(item.parts): triangle_offsets = create_polygon(len(item.parts), length=10) diff --git a/overcooked_simulator/gui_2d_vis/visualization.yaml b/overcooked_simulator/gui_2d_vis/visualization.yaml index 5cef5d26cd8be74c201ed6c220d1e6b87cc4d5a8..bd1a09aedbde01b56c6fa7699b2a59c2abd22bd9 100644 --- a/overcooked_simulator/gui_2d_vis/visualization.yaml +++ b/overcooked_simulator/gui_2d_vis/visualization.yaml @@ -201,6 +201,7 @@ OnionSoup: - type: image path: images/onion_soup_pot.png size: 1.25 + center_offset: [ -0.02, -0.1 ] OnionSoupPlate: parts: