From 62d918e5feeaf5b3add982a5baaffb201a1f2ece Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 19 Oct 2025 00:38:09 +0200 Subject: Implement interaction with other players through id instead of tile pos --- server/bot/src/algos/customer.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/bot/src/algos') diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs index 010ef48a..bd757d9e 100644 --- a/server/bot/src/algos/customer.rs +++ b/server/bot/src/algos/customer.rs @@ -24,7 +24,7 @@ use crate::{ }; use hurrycurry_client_lib::Game; use hurrycurry_protocol::{ - DemandIndex, Hand, Message, PacketS, PlayerClass, PlayerID, Score, + DemandIndex, Hand, ItemLocation, Message, PacketS, PlayerClass, PlayerID, Score, glam::{IVec2, Vec2}, }; use log::debug; @@ -314,7 +314,7 @@ impl CustomerState { player: me, }, PacketS::Interact { - pos: Some(pos), + target: Some(ItemLocation::Tile(pos)), player: me, hand: Hand(0), }, @@ -324,7 +324,7 @@ impl CustomerState { ..Default::default() }), PacketS::Interact { - pos: None, + target: None, player: me, hand: Hand(0), }, @@ -393,12 +393,12 @@ impl CustomerState { extra: vec![ PacketS::Interact { player: me, - pos: Some(*table), + target: Some(ItemLocation::Tile(*table)), hand: Hand(0), }, PacketS::Interact { player: me, - pos: None, + target: None, hand: Hand(0), }, ], -- cgit v1.3