aboutsummaryrefslogtreecommitdiff
path: root/server/src/customer.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-19 22:52:37 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-23 19:21:49 +0200
commit6ca76cc0568f3d60b280f11ae07a34303c317f34 (patch)
treeac867e47b3fb4b6ed99189cb302b2741b107d272 /server/src/customer.rs
parent3dc8cc2abb4e6a7be8237b86dab6ebed75fa43cb (diff)
downloadhurrycurry-6ca76cc0568f3d60b280f11ae07a34303c317f34.tar
hurrycurry-6ca76cc0568f3d60b280f11ae07a34303c317f34.tar.bz2
hurrycurry-6ca76cc0568f3d60b280f11ae07a34303c317f34.tar.zst
implement customer communication
Diffstat (limited to 'server/src/customer.rs')
-rw-r--r--server/src/customer.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/src/customer.rs b/server/src/customer.rs
index b003c935..87b67f0e 100644
--- a/server/src/customer.rs
+++ b/server/src/customer.rs
@@ -1,7 +1,7 @@
use crate::{
data::Gamedata,
game::Game,
- protocol::{PacketC, PacketS, PlayerID},
+ protocol::{Message, PacketC, PacketS, PlayerID},
};
use glam::{IVec2, Vec2};
use log::{debug, error};
@@ -118,6 +118,12 @@ impl DemandState {
packets_out
.push((p.id, move_player(p, &self.walkable, next - p.position, dt)));
} else {
+ packets_out.push((
+ p.id,
+ PacketS::Communicate {
+ message: Some(Message::Item(4)),
+ },
+ ));
p.state = CustomerState::Waiting { chair: *chair };
}
}