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

Fixed putting multiple onions on a plate

parent 7b03cb1a
No related branches found
No related tags found
1 merge request!27Resolve "Orders"
Pipeline #43963 passed
...@@ -200,8 +200,14 @@ class CookingEquipment(Item): ...@@ -200,8 +200,14 @@ class CookingEquipment(Item):
class Plate(CookingEquipment): class Plate(CookingEquipment):
def __init__(self, transitions, clean, *args, **kwargs): def __init__(self, transitions, clean, *args, **kwargs):
self.clean = clean self.clean = clean
self.meals = set(transitions.keys())
super().__init__( super().__init__(
name=self.create_name(), transitions=transitions, *args, **kwargs name=self.create_name(),
transitions={
k: v for k, v in transitions.items() if not v["info"].equipment
},
*args,
**kwargs,
) )
def finished_call(self): def finished_call(self):
...@@ -222,7 +228,7 @@ class Plate(CookingEquipment): ...@@ -222,7 +228,7 @@ class Plate(CookingEquipment):
and not self.content_list and not self.content_list
and self.clean and self.clean
): ):
return other.content_list[0].name in self.transitions return other.content_list[0].name in self.meals
return False return False
else: else:
return True return True
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