diff --git a/overcooked_simulator/counters.py b/overcooked_simulator/counters.py index 3d930aa54e15a4c6ad9f187b3766eee34f96cc07..a7f126d7c9c489c71363bf9451964118e23746b2 100644 --- a/overcooked_simulator/counters.py +++ b/overcooked_simulator/counters.py @@ -461,7 +461,8 @@ class PlateConfig: """dirty plates at the start.""" plate_delay: list[int, int] = dataclasses.field(default_factory=lambda: [5, 10]) """The uniform sampling range for the plate delay between serving and return in seconds.""" - + return_dirty: bool = True + """Specifies if plates are returned dirty or clean to the plate dispenser.""" class PlateDispenser(Counter): """At the moment, one and only one plate dispenser must exist in an environment, because only at one place the dirty @@ -522,7 +523,7 @@ class PlateDispenser(Counter): def add_dirty_plate(self): """Add a dirty plate after a timer is completed.""" - self.occupied_by.appendleft(self.create_item()) + self.occupied_by.appendleft(self.create_item(clean=not self.plate_config.return_dirty)) def update_plate_out_of_kitchen(self, env_time: datetime): """Is called from the serving window to add a plate out of kitchen."""