From 5033c326094edc1ff4234b994e95d987cb937fc4 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 30 Sep 2025 01:19:01 +0200 Subject: Implement tile placeable items for server-side (#433) --- server/protocol/src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'server/protocol/src/lib.rs') diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs index c32bff39..00ef62d7 100644 --- a/server/protocol/src/lib.rs +++ b/server/protocol/src/lib.rs @@ -17,7 +17,10 @@ */ use glam::{IVec2, Vec2}; use serde::{Deserialize, Deserializer, Serialize}; -use std::{collections::HashSet, sync::LazyLock}; +use std::{ + collections::{BTreeMap, HashSet}, + sync::LazyLock, +}; pub use glam; @@ -76,14 +79,14 @@ pub struct Demand { pub points: i64, } -#[derive(Debug, Clone, Serialize, Deserialize, Default)] +#[derive(Debug, Clone, Serialize, Deserialize, Default)] #[rustfmt::skip] pub struct Gamedata { pub current_map: String, pub item_names: Vec, pub tile_names: Vec, - pub tile_collide: Vec, - pub tile_interact: Vec, + pub tile_walkable: HashSet, + pub tile_placeable_items: BTreeMap>, pub maps: Vec<(String, MapMetadata)>, pub bot_algos: Vec, pub recipes: Vec, -- cgit v1.2.3-70-g09d2