aboutsummaryrefslogtreecommitdiff
path: root/server/protocol/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-03-24 16:46:16 +0100
committermetamuffin <metamuffin@disroot.org>2026-03-24 16:46:16 +0100
commitef733f9c8bc4d07609c7c3388203762f12e9065c (patch)
tree6b1b8ddeb28d3d938cf5ccb03e97cfbae8106bb5 /server/protocol/src/lib.rs
parent2a7a6b2deb1fe3457b1946654ebfaec2f79e8cc2 (diff)
downloadhurrycurry-ef733f9c8bc4d07609c7c3388203762f12e9065c.tar
hurrycurry-ef733f9c8bc4d07609c7c3388203762f12e9065c.tar.bz2
hurrycurry-ef733f9c8bc4d07609c7c3388203762f12e9065c.tar.zst
Effect when points are changed; change effect packetHEADmaster
Diffstat (limited to 'server/protocol/src/lib.rs')
-rw-r--r--server/protocol/src/lib.rs17
1 files changed, 13 insertions, 4 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs
index d24b4973..9dd7e2f4 100644
--- a/server/protocol/src/lib.rs
+++ b/server/protocol/src/lib.rs
@@ -183,8 +183,8 @@ pub enum PacketS {
/// For internal use only (customers)
#[serde(skip)]
Effect {
- player: PlayerID,
- name: String,
+ effect: Effect,
+ location: ItemLocation,
},
/// Used internally and only used when built with debug_events
@@ -287,8 +287,9 @@ pub enum PacketC {
message: Option<Message>,
timeout: Option<MessageTimeout>,
},
- Effect2 {
- name: String,
+ Effect {
+ #[serde(flatten)]
+ effect: Effect,
location: ItemLocation,
},
ServerMessage {
@@ -369,6 +370,14 @@ pub struct GameConfig {
}
#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(rename_all = "snake_case", tag = "effect")]
+pub enum Effect {
+ Satisfied,
+ Angry,
+ Points { amount: i64 },
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "snake_case", tag = "menu", content = "data")]
pub enum Menu {
Score(Score),