diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/Cargo.toml | 1 | ||||
-rw-r--r-- | server/protocol/src/lib.rs | 2 | ||||
-rw-r--r-- | server/replaytool/Cargo.toml | 10 | ||||
-rw-r--r-- | server/replaytool/src/main.rs | 4 | ||||
-rw-r--r-- | server/src/customer/mod.rs | 3 | ||||
-rw-r--r-- | server/src/customer/movement.rs | 3 | ||||
-rw-r--r-- | server/src/customer/pathfinding.rs | 6 | ||||
-rw-r--r-- | server/src/data.rs | 6 | ||||
-rw-r--r-- | server/src/entity/conveyor.rs | 3 | ||||
-rw-r--r-- | server/src/entity/mod.rs | 3 | ||||
-rw-r--r-- | server/src/game.rs | 2 |
11 files changed, 28 insertions, 15 deletions
diff --git a/server/Cargo.toml b/server/Cargo.toml index e8cb0ed9..da084855 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -5,7 +5,6 @@ edition = "2021" default-run = "hurrycurry-server" [dependencies] -glam = { version = "0.28.0", features = ["serde"] } log = "0.4.22" env_logger = "0.11.3" anyhow = "1.0.86" diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs index 0342049c..49ff6e1d 100644 --- a/server/protocol/src/lib.rs +++ b/server/protocol/src/lib.rs @@ -19,6 +19,8 @@ use glam::{IVec2, Vec2}; use serde::{Deserialize, Serialize}; use std::collections::HashSet; +pub use glam; + #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)] #[serde(transparent)] pub struct PlayerID(pub i64); diff --git a/server/replaytool/Cargo.toml b/server/replaytool/Cargo.toml index 6983781d..16f8377a 100644 --- a/server/replaytool/Cargo.toml +++ b/server/replaytool/Cargo.toml @@ -4,4 +4,14 @@ version = "0.1.0" edition = "2021" [dependencies] +log = "0.4.22" +env_logger = "0.11.3" +anyhow = "1.0.86" +serde = { version = "1.0.204", features = ["derive"] } +tokio = { version = "1.38.0", features = ["full"] } +serde_json = "1.0.120" +tokio-tungstenite = "0.23.1" +futures-util = "0.3.30" +rand = "0.9.0-alpha.1" + hurrycurry-protocol = { path = "../protocol" } diff --git a/server/replaytool/src/main.rs b/server/replaytool/src/main.rs index 58dfaaa8..efdc36e0 100644 --- a/server/replaytool/src/main.rs +++ b/server/replaytool/src/main.rs @@ -1,3 +1,5 @@ -fn main() { + +#[tokio::main] +async fn main() { } diff --git a/server/src/customer/mod.rs b/server/src/customer/mod.rs index c11a1aec..10788206 100644 --- a/server/src/customer/mod.rs +++ b/server/src/customer/mod.rs @@ -21,8 +21,7 @@ mod pathfinding; use crate::{data::Gamedata, game::Tile}; use anyhow::{anyhow, Result}; use fake::{faker, Fake}; -use glam::IVec2; -use hurrycurry_protocol::{DemandIndex, Message, PacketS, PlayerID}; +use hurrycurry_protocol::{glam::IVec2, DemandIndex, Message, PacketS, PlayerID}; use log::debug; use movement::MovementBase; use pathfinding::{find_path, Path}; diff --git a/server/src/customer/movement.rs b/server/src/customer/movement.rs index 4da76de7..34ed5b16 100644 --- a/server/src/customer/movement.rs +++ b/server/src/customer/movement.rs @@ -16,8 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -use glam::{IVec2, Vec2}; -use hurrycurry_protocol::PacketS; +use hurrycurry_protocol::{glam::{IVec2, Vec2}, PacketS}; use std::collections::HashSet; const PLAYER_SIZE: f32 = 0.4; diff --git a/server/src/customer/pathfinding.rs b/server/src/customer/pathfinding.rs index a2623e5c..29ee4e00 100644 --- a/server/src/customer/pathfinding.rs +++ b/server/src/customer/pathfinding.rs @@ -16,8 +16,10 @@ */ use super::movement::MovementBase; -use glam::{IVec2, Vec2}; -use hurrycurry_protocol::PacketS; +use hurrycurry_protocol::{ + glam::{IVec2, Vec2}, + PacketS, +}; use log::debug; use std::{ cmp::Ordering, diff --git a/server/src/data.rs b/server/src/data.rs index fd028c94..9fd3e95c 100644 --- a/server/src/data.rs +++ b/server/src/data.rs @@ -21,8 +21,10 @@ use crate::{ interaction::Recipe, }; use anyhow::{anyhow, bail, Result}; -use glam::{IVec2, Vec2}; -use hurrycurry_protocol::{DemandIndex, ItemIndex, RecipeIndex, TileIndex}; +use hurrycurry_protocol::{ + glam::{IVec2, Vec2}, + DemandIndex, ItemIndex, RecipeIndex, TileIndex, +}; use serde::{Deserialize, Serialize}; use std::{ collections::{HashMap, HashSet}, diff --git a/server/src/entity/conveyor.rs b/server/src/entity/conveyor.rs index f4692f6d..4d11ffe1 100644 --- a/server/src/entity/conveyor.rs +++ b/server/src/entity/conveyor.rs @@ -21,8 +21,7 @@ use crate::{ game::{interact_effect, Tile}, }; use anyhow::{anyhow, Result}; -use glam::IVec2; -use hurrycurry_protocol::{ItemLocation, PacketC}; +use hurrycurry_protocol::{glam::IVec2, ItemLocation, PacketC}; use std::collections::{HashMap, VecDeque}; #[derive(Debug, Default, Clone)] diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs index 1bc558b1..925ed5f4 100644 --- a/server/src/entity/mod.rs +++ b/server/src/entity/mod.rs @@ -19,8 +19,7 @@ pub mod conveyor; use crate::{data::Gamedata, game::Tile}; use anyhow::{anyhow, Result}; use conveyor::Conveyor; -use glam::IVec2; -use hurrycurry_protocol::PacketC; +use hurrycurry_protocol::{glam::IVec2, PacketC}; use serde::{Deserialize, Serialize}; use std::collections::{HashMap, VecDeque}; diff --git a/server/src/game.rs b/server/src/game.rs index daf08ad3..74bc9d45 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -22,8 +22,8 @@ use crate::{ interaction::{interact, tick_slot, InteractEffect, TickEffect}, }; use anyhow::{anyhow, bail, Result}; -use glam::{IVec2, Vec2}; use hurrycurry_protocol::{ + glam::{IVec2, Vec2}, ClientGamedata, ItemIndex, ItemLocation, Message, PacketC, PacketS, PlayerID, RecipeIndex, TileIndex, }; |