diff options
Diffstat (limited to 'server/protocol')
-rw-r--r-- | server/protocol/src/lib.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs index 147a4fc3..cb72d2ff 100644 --- a/server/protocol/src/lib.rs +++ b/server/protocol/src/lib.rs @@ -17,7 +17,7 @@ */ use glam::{IVec2, Vec2}; use serde::{Deserialize, Serialize}; -use std::{collections::HashSet, fmt::Display}; +use std::{collections::HashMap, fmt::Display}; pub use glam; @@ -38,6 +38,13 @@ pub struct RecipeIndex(pub usize); #[serde(transparent)] pub struct DemandIndex(pub usize); +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct MapMetadata { + name: String, + players: usize, + difficulty: i32, +} + #[derive(Debug, Clone, Serialize, Deserialize, Default)] #[rustfmt::skip] pub struct ClientGamedata { @@ -45,7 +52,7 @@ pub struct ClientGamedata { pub tile_names: Vec<String>, pub tile_collide: Vec<bool>, pub tile_interact: Vec<bool>, - pub map_names: HashSet<String>, + pub maps: HashMap<String, MapMetadata>, } #[derive(Debug, Clone, Serialize, Deserialize)] |