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

Simpler putting things on plate dispenser and picking new plates up

parent 21438434
No related branches found
No related tags found
1 merge request!1340-visualisierungsregeln
Pipeline #42064 failed
......@@ -153,12 +153,9 @@ class Dispenser(Counter):
)
def pick_up(self, on_hands: bool = True):
new_dispensing = self.dispensing.create_item()
if self.occupied_by != new_dispensing:
old_dispensing = self.occupied_by
self.occupied_by = new_dispensing
return old_dispensing
return new_dispensing
return_this = self.occupied_by
self.occupied_by = self.dispensing.create_item()
return return_this
def drop_off(self, item: Item) -> Item | None:
if self.occupied_by.can_combine(item):
......
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