Skip to content
Snippets Groups Projects
Commit c44a58ff authored by Florian Schröder's avatar Florian Schröder
Browse files

fix dirty plate bug and realistic times

parent 78603eb3
No related branches found
No related tags found
1 merge request!27Resolve "Orders"
Pipeline #44051 passed
......@@ -11,16 +11,16 @@ orders:
duration_sample:
func: uniform
kwargs:
a: 3
b: 5
a: 40
b: 60
max_orders: 6
num_start_meals: 3
sample_on_dur: true
sample_on_dur_func:
func: uniform
kwargs:
a: 1
b: 2
a: 10
b: 20
sample_on_serving: false
score_calc_gen_kwargs:
other: 0
......
......@@ -44,30 +44,30 @@ Bun:
ChoppedTomato:
type: Ingredient
needs: [ Tomato ]
seconds: 0.1
seconds: 4.0
equipment: CuttingBoard
ChoppedLettuce:
type: Ingredient
needs: [ Lettuce ]
seconds: 0.1
seconds: 3.0
equipment: CuttingBoard
ChoppedOnion:
type: Ingredient
needs: [ Onion ]
seconds: 0.1
seconds: 5.0
equipment: CuttingBoard
ChoppedMeat:
type: Ingredient
needs: [ Meat ]
seconds: 0.1
seconds: 4.0
equipment: CuttingBoard
CookedPatty:
type: Ingredient
seconds: 2.0
seconds: 5.0
needs: [ ChoppedMeat ]
equipment: Pan
......@@ -86,11 +86,11 @@ Salad:
TomatoSoup:
type: Meal
needs: [ ChoppedTomato, ChoppedTomato, ChoppedTomato ]
seconds: 3.0
seconds: 6.0
equipment: Pot
OnionSoup:
type: Meal
needs: [ ChoppedOnion, ChoppedOnion, ChoppedOnion ]
seconds: 3.0
seconds: 6.0
equipment: Pot
CuttingBoard:
type: Equipment
Sink:
type: Equipment
Stove:
type: Equipment
Pot:
type: Equipment
equipment: Stove
Pan:
type: Equipment
equipment: Stove
DirtyPlate:
type: Equipment
Plate:
type: Equipment
needs: [ DirtyPlate ]
seconds: 1.0
equipment: Sink
# --------------------------------------------------------------------------------
Tomato:
type: Ingredient
Lettuce:
type: Ingredient
Onion:
type: Ingredient
Meat:
type: Ingredient
Bun:
type: Ingredient
ChoppedTomato:
type: Ingredient
needs: [ Tomato ]
seconds: 0.1
equipment: CuttingBoard
ChoppedLettuce:
type: Ingredient
needs: [ Lettuce ]
seconds: 0.1
equipment: CuttingBoard
ChoppedOnion:
type: Ingredient
needs: [ Onion ]
seconds: 0.1
equipment: CuttingBoard
ChoppedMeat:
type: Ingredient
needs: [ Meat ]
seconds: 0.1
equipment: CuttingBoard
CookedPatty:
type: Ingredient
seconds: 2.0
needs: [ ChoppedMeat ]
equipment: Pan
# --------------------------------------------------------------------------------
Burger:
type: Meal
needs: [ Bun, ChoppedLettuce, ChoppedTomato, CookedPatty ]
equipment: ~
Salad:
type: Meal
needs: [ ChoppedLettuce, ChoppedTomato ]
equipment: ~
TomatoSoup:
type: Meal
needs: [ ChoppedTomato, ChoppedTomato, ChoppedTomato ]
seconds: 3.0
equipment: Pot
OnionSoup:
type: Meal
needs: [ ChoppedOnion, ChoppedOnion, ChoppedOnion ]
seconds: 3.0
equipment: Pot
......@@ -129,6 +129,7 @@ class CookingEquipment(Item):
ingredients = collections.Counter(
item.name for item in self.content_list + other
)
print(ingredients)
return any(
ingredients <= recipe["recipe"] for recipe in self.transitions.values()
)
......@@ -237,5 +238,6 @@ class Plate(CookingEquipment):
):
return other.content_list[0].name in self.meals
return False
else:
elif self.clean:
return True
return False
......@@ -524,8 +524,8 @@ class PyGameGUI:
"""
pos = counter.pos * self.grid_size
self.draw_thing(pos, self.visualization_config["Counter"]["parts"])
if counter.__class__.__name__ != "Trash":
self.draw_thing(pos, self.visualization_config["Counter"]["parts"])
if str(counter) in self.visualization_config:
self.draw_thing(pos, self.visualization_config[str(counter)]["parts"])
else:
......
......@@ -2,7 +2,7 @@
GameWindow:
WhatIsFixed: grid # grid or window_width or window_height
size: 50
size: 80
screen_margin: 100
min_width: 700
min_height: 600
......
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