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

Update drop-off conditions in counters.py

The code for the drop-off condition within the Overcooked simulator's counters module has been updated. The updated condition now checks not only if the item can be combined or matches the dispensing item's name but also checks if the undo dispenser pickup flag is true.
parent 076a36a5
No related branches found
No related tags found
No related merge requests found
Pipeline #47393 passed
......@@ -441,7 +441,9 @@ class Dispenser(Counter):
return self.occupied_by.combine(item)
def can_drop_off(self, item: Item) -> bool:
return self.occupied_by.can_combine(item) or item.name == self.dispensing.name
return self.occupied_by.can_combine(item) or (
self.undo_dispenser_pickup and item.name == self.dispensing.name
)
def __repr__(self):
return f"{self.dispensing.name}Dispenser"
......
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