diff options
Diffstat (limited to 'server/bot/src/algos/customer.rs')
-rw-r--r-- | server/bot/src/algos/customer.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs index 826ab534..b0ece9dd 100644 --- a/server/bot/src/algos/customer.rs +++ b/server/bot/src/algos/customer.rs @@ -313,7 +313,7 @@ impl CustomerState { PacketS::Interact { pos: Some(pos), player: me, - hand: Hand::Left, + hand: Hand(0), }, PacketS::ApplyScore(Score { demands_completed: 1, @@ -323,7 +323,7 @@ impl CustomerState { PacketS::Interact { pos: None, player: me, - hand: Hand::Left, + hand: Hand(0), }, ], ..Default::default() @@ -356,7 +356,7 @@ impl CustomerState { extra: vec![PacketS::ReplaceHand { player: me, item: demand.output, - hand: Hand::Left, + hand: Hand(0), }], ..Default::default() }; @@ -375,7 +375,8 @@ impl CustomerState { if game .players .get(&me) - .is_some_and(|pl| pl.items[Hand::Left.index()].is_none()) + .is_some_and(|pl| pl.items[0].is_none()) + // TODO index out of bounds? { if let Some(path) = find_path(&game.walkable, pos.as_ivec2(), *origin) { *self = CustomerState::Exiting { path }; @@ -390,12 +391,12 @@ impl CustomerState { PacketS::Interact { player: me, pos: Some(*table), - hand: Hand::Left, + hand: Hand(0), }, PacketS::Interact { player: me, pos: None, - hand: Hand::Left, + hand: Hand(0), }, ], direction, |