diff options
Diffstat (limited to 'server/bot/src/algos/customer.rs')
-rw-r--r-- | server/bot/src/algos/customer.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs index e26acf09..b243bd55 100644 --- a/server/bot/src/algos/customer.rs +++ b/server/bot/src/algos/customer.rs @@ -141,7 +141,7 @@ impl CustomerState { if game .tiles .get(&(off + *chair)) - .map_or(false, |t| game.data.is_tile_interactable(t.kind)) + .is_some_and(|t| game.data.is_tile_interactable(t.kind)) { facing = off.as_vec2(); } @@ -240,7 +240,7 @@ impl CustomerState { if game .players .get(&pid) - .map_or(false, |p| p.class.is_cheflike()) + .is_some_and(|p| p.class.is_cheflike()) { pin = true } @@ -369,7 +369,7 @@ impl CustomerState { cooldown, } => { *cooldown -= dt; - if game.players.get(&me).map_or(false, |pl| pl.item.is_none()) { + if game.players.get(&me).is_some_and(|pl| pl.item.is_none()) { if let Some(path) = find_path(&game.walkable, pos.as_ivec2(), *origin) { *self = CustomerState::Exiting { path }; } |