aboutsummaryrefslogtreecommitdiff
path: root/server/bot/src/algos
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-10-12 02:43:19 +0200
committermetamuffin <metamuffin@disroot.org>2024-10-12 02:43:19 +0200
commit315cdc0618c72d9a39761cc2199e64110ea620f8 (patch)
tree18e5851d9912e10402ec3b5a823b68ba52889b8d /server/bot/src/algos
parent1eac2e6152f1325a33585ef079bd6962252c1436 (diff)
parent47d1ca9d3f470fb8e90efe52ee033e9f17677e96 (diff)
downloadhurrycurry-315cdc0618c72d9a39761cc2199e64110ea620f8.tar
hurrycurry-315cdc0618c72d9a39761cc2199e64110ea620f8.tar.bz2
hurrycurry-315cdc0618c72d9a39761cc2199e64110ea620f8.tar.zst
Merge branch 'master' of https://codeberg.org/hurrycurry/hurrycurry
Diffstat (limited to 'server/bot/src/algos')
-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(())