summaryrefslogtreecommitdiff
path: root/server/src/protocol.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/protocol.rs')
-rw-r--r--server/src/protocol.rs26
1 files changed, 8 insertions, 18 deletions
diff --git a/server/src/protocol.rs b/server/src/protocol.rs
index 0218658d..a318a9b2 100644
--- a/server/src/protocol.rs
+++ b/server/src/protocol.rs
@@ -3,24 +3,13 @@ use serde::{Deserialize, Serialize};
pub type ID = u32;
-#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
-#[serde(rename_all = "snake_case")]
-pub enum Item {
- Flour,
- Water,
- Dough,
- Pancake,
-}
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(transparent)]
+pub struct Item(pub String);
-#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
-#[serde(rename_all = "snake_case")]
-pub enum Tile {
- Sink,
- FlourBag,
- Floor,
- Table,
- Pan,
-}
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(transparent)]
+pub struct Tile(pub String);
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
@@ -28,7 +17,7 @@ pub enum PacketS {
Join { name: String },
Leave,
Position { pos: Vec2, rot: f32 },
- Interact { pos: IVec2 },
+ Interact { pos: IVec2, edge: bool },
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -69,6 +58,7 @@ pub enum PacketC {
},
SetActive {
tile: IVec2,
+ progress: f32,
},
UpdateMap {
pos: IVec2,