diff options
author | metamuffin <metamuffin@disroot.org> | 2024-08-14 13:05:45 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-08-14 13:05:45 +0200 |
commit | 8253658aa03294fba2a43ba287ca1870a2b6b4cb (patch) | |
tree | aa4f3460652b6825320eb70c5e7e2bef764ad08f /server/protocol/src/lib.rs | |
parent | 2a63061552ae15abd03bdf3efdeaf87be3d0ef3b (diff) | |
download | hurrycurry-8253658aa03294fba2a43ba287ca1870a2b6b4cb.tar hurrycurry-8253658aa03294fba2a43ba287ca1870a2b6b4cb.tar.bz2 hurrycurry-8253658aa03294fba2a43ba287ca1870a2b6b4cb.tar.zst |
sort maps in data packet
Diffstat (limited to 'server/protocol/src/lib.rs')
-rw-r--r-- | server/protocol/src/lib.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs index 72eeb0c7..06cc9552 100644 --- a/server/protocol/src/lib.rs +++ b/server/protocol/src/lib.rs @@ -21,10 +21,7 @@ use bincode::{ }; use glam::{IVec2, Vec2}; use serde::{Deserialize, Serialize}; -use std::{ - collections::{HashMap, HashSet}, - fmt::Display, -}; +use std::{collections::HashSet, fmt::Display}; pub use glam; @@ -64,9 +61,9 @@ pub struct DemandIndex(pub usize); #[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)] pub struct MapMetadata { - name: String, - players: usize, - difficulty: i32, + pub name: String, + pub players: usize, + pub difficulty: i32, } #[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)] @@ -85,7 +82,8 @@ pub struct Gamedata { pub tile_names: Vec<String>, pub tile_collide: Vec<bool>, pub tile_interact: Vec<bool>, - pub maps: HashMap<String, MapMetadata>, + pub maps: Vec<(String, MapMetadata)>, + pub bot_algos: Vec<String>, pub recipes: Vec<Recipe>, pub demands: Vec<Demand>, } |