aboutsummaryrefslogtreecommitdiff
path: root/server/bot/src/algos/dishwasher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/bot/src/algos/dishwasher.rs')
-rw-r--r--server/bot/src/algos/dishwasher.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/bot/src/algos/dishwasher.rs b/server/bot/src/algos/dishwasher.rs
index bfe57d0c..b52b72d1 100644
--- a/server/bot/src/algos/dishwasher.rs
+++ b/server/bot/src/algos/dishwasher.rs
@@ -99,10 +99,9 @@ impl Context<'_, DishWasher> {
self.assert_tile_is_clear(pos)?;
}
if self.is_hand_item(self.state.dirty_plate.unwrap()) {
- self.interact_with(
- self.find_empty_interactable_tile_by_name("sink").unwrap(),
- 2.0,
- )?;
+ if let Some(sink) = self.find_empty_interactable_tile_by_name("sink") {
+ self.interact_with(sink, 2.0)?;
+ }
}
self.assert_hand_is_clear()?;
Ok(())