From 6500d7059b0eafeaca3e1d6b264130ffd73d1414 Mon Sep 17 00:00:00 2001 From: fheinrich <fheinrich@techfak.de> Date: Thu, 8 Feb 2024 11:40:45 +0100 Subject: [PATCH] Plates can be returned clean, Configurable. --- overcooked_simulator/counters.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/overcooked_simulator/counters.py b/overcooked_simulator/counters.py index 3d930aa5..a7f126d7 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.""" -- GitLab