diff --git a/cooperative_cuisine/configs/item_info.yaml b/cooperative_cuisine/configs/item_info.yaml index 96ddf78c9ddb9800f1948f9e159cc2215784648c..f8a14b7f57adbe184f318892a2d236338c66b43e 100644 --- a/cooperative_cuisine/configs/item_info.yaml +++ b/cooperative_cuisine/configs/item_info.yaml @@ -172,6 +172,11 @@ FishAndChips: needs: [ FriedFish, Chips ] equipment: ~ +BurgerWithChips: + type: Meal + needs: [ Burger, Chips ] + equipment: ~ + Pizza: type: Meal needs: [ PizzaBase, ChoppedTomato, GratedCheese, ChoppedSausage ] diff --git a/cooperative_cuisine/pygame_2d_vis/visualization.yaml b/cooperative_cuisine/pygame_2d_vis/visualization.yaml index 6cccb65b0358f4d6d6191ada7e67340ff0bb8e7b..9b2dcffe094b750fa66085196ec715fd9d1a5530 100644 --- a/cooperative_cuisine/pygame_2d_vis/visualization.yaml +++ b/cooperative_cuisine/pygame_2d_vis/visualization.yaml @@ -5,6 +5,7 @@ Gui: use_player_cook_sprites: True show_interaction_range: False show_counter_centers: False + press_button_to_continue: False GameWindow: screen_margin_proportion: 0.15 @@ -35,6 +36,16 @@ Counter: path: images/counter5.png size: 1 +EdgeCounter: + parts: + # - type: rect + # height: 1 + # width: 1 + # color: whitesmoke + - type: image + path: images/wall.png + size: 1 + CuttingBoard: parts: - type: image @@ -44,11 +55,10 @@ CuttingBoard: PlateDispenser: - parts: [ ] -# - type: rect -# height: 0.95 -# width: 0.95 -# color: cadetblue1 + parts: + - type: image + path: images/plate_dispenser.png + size: 1 Trashcan: parts: @@ -113,11 +123,11 @@ ServingWindow: size: 0.8 center_offset: [ 0, -0.02 ] rotate_image: False - - type: image - path: images/bell_gold.png - size: 0.5 - center_offset: [ -0.2, -0.05 ] - rotate_image: False +# - type: image +# path: images/bell_gold.png +# size: 0.5 +# center_offset: [ -0.2, -0.05 ] +# rotate_image: False Stove: parts: @@ -376,6 +386,18 @@ FishAndChips: size: 0.8 center_offset: [ +0.2, 0 ] +BurgerWithChips: + parts: + - type: image + path: images/fries2.png + size: 0.8 + center_offset: [ -0.1, 0 ] + - type: image + path: images/burger.png + size: 0.8 + center_offset: [ +0.2, 0 ] + + Dough: parts: - type: image diff --git a/cooperative_cuisine/validation.py b/cooperative_cuisine/validation.py index e6b615cb68126dcf457f5a7f5d6d534427bef75c..cea549750ef51f2cbfc6b323cd8a3c6d14fb3eca 100644 --- a/cooperative_cuisine/validation.py +++ b/cooperative_cuisine/validation.py @@ -2,6 +2,7 @@ import hashlib import json import os +import uuid import warnings from typing import TypedDict, Tuple, Iterator, Set @@ -144,18 +145,19 @@ class Validation: graph.add_edge(need, current) elif len(current_info.needs) > 1: - for idx, item_name in enumerate(current_info.needs): - add_queue.append(f"{item_name}_{idx}") + for item_name in current_info.needs: + unique_id = uuid.uuid4().hex + add_queue.append(f"{item_name}_{unique_id}") if current_info.equipment and current_info.equipment.equipment: equip_id = f"{current_info.equipment.name}_{current_index}" equip_equip_id = f"{current_info.equipment.equipment.name}_{current_index}" graph.add_edge(equip_equip_id, current) graph.add_edge(equip_id, equip_equip_id) - graph.add_edge(f"{item_name}_{idx}", equip_id) + graph.add_edge(f"{item_name}_{unique_id}", equip_id) else: graph.add_edge( - f"{item_name}_{idx}", + f"{item_name}_{unique_id}", current, )