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

Fixed graph generation when multiple meals are combined. Added Burger with fries

parent f0eea284
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,11 @@ FishAndChips:
needs: [ FriedFish, Chips ]
equipment: ~
BurgerWithChips:
type: Meal
needs: [ Burger, Chips ]
equipment: ~
Pizza:
type: Meal
needs: [ PizzaBase, ChoppedTomato, GratedCheese, ChoppedSausage ]
......
......@@ -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
......
......@@ -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,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment