aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity/book.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-18 15:42:19 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-18 15:42:19 +0200
commitfb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b (patch)
tree76b1a77dcd3ae29595caaa6423a18b5ce29e32db /server/src/entity/book.rs
parente5fdbaadbf01f14290e70c49482e1dce3c9816d8 (diff)
downloadhurrycurry-fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b.tar
hurrycurry-fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b.tar.bz2
hurrycurry-fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b.tar.zst
translate server messages
Diffstat (limited to 'server/src/entity/book.rs')
-rw-r--r--server/src/entity/book.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/entity/book.rs b/server/src/entity/book.rs
index 9c1192da..11ec847b 100644
--- a/server/src/entity/book.rs
+++ b/server/src/entity/book.rs
@@ -16,6 +16,7 @@
*/
use super::{Entity, EntityContext};
+use crate::TrError;
use anyhow::Result;
use hurrycurry_protocol::{glam::IVec2, Menu, PacketC, PlayerID};
@@ -28,7 +29,7 @@ impl Entity for Book {
c: EntityContext<'_>,
pos: Option<IVec2>,
_player: PlayerID,
- ) -> Result<bool> {
+ ) -> Result<bool, TrError> {
if pos == Some(self.0) {
c.packet_out.push_back(PacketC::Menu(Menu::Book));
return Ok(true);