diff options
author | metamuffin <metamuffin@disroot.org> | 2024-07-26 15:44:46 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-07-26 15:44:51 +0200 |
commit | a225076005533744dca4afe86fa152470b225e6b (patch) | |
tree | 78df4a67d4e9ee8372d28e5efd1c6e56bab2ac84 | |
parent | d8b81fc1ab3f335ebae97665bfd74a519391262b (diff) | |
download | hurrycurry-a225076005533744dca4afe86fa152470b225e6b.tar hurrycurry-a225076005533744dca4afe86fa152470b225e6b.tar.bz2 hurrycurry-a225076005533744dca4afe86fa152470b225e6b.tar.zst |
add environment to protocol
-rw-r--r-- | server/protocol/src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs index fcccb107..f4513641 100644 --- a/server/protocol/src/lib.rs +++ b/server/protocol/src/lib.rs @@ -203,6 +203,7 @@ pub enum PacketC { }, Menu(Menu), MovementSync, + UpdateEnvironment(Environment), /// For use in replay sessions only ReplayStart, @@ -228,6 +229,13 @@ pub struct Score { pub instant_recipes: usize, } +#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode, Default)] +pub struct Environment { + rain: f64, // 0-1; clear..raining + wind: f64, // 0-1; still..stormy + time: f64, // 0-1; night..morning..noon..evening +} + #[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode, Copy, PartialEq, Eq, Hash)] #[serde(rename_all = "snake_case")] pub enum ItemLocation { |