summaryrefslogtreecommitdiff
path: root/server/protocol
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-08-13 16:03:19 +0200
committermetamuffin <metamuffin@disroot.org>2024-08-13 16:03:38 +0200
commit8d83fcef94ce1558a2c0e29e8be6c966c7e10a5b (patch)
treef674b2ea255a5d80ef7ee320e313a02a9a72bc4b /server/protocol
parent0f94e292bde8b9614aa48a6ba87f1a8d927b8133 (diff)
downloadhurrycurry-8d83fcef94ce1558a2c0e29e8be6c966c7e10a5b.tar
hurrycurry-8d83fcef94ce1558a2c0e29e8be6c966c7e10a5b.tar.bz2
hurrycurry-8d83fcef94ce1558a2c0e29e8be6c966c7e10a5b.tar.zst
trying to reimplement customers
Diffstat (limited to 'server/protocol')
-rw-r--r--server/protocol/src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs
index 695d45cf..80d94192 100644
--- a/server/protocol/src/lib.rs
+++ b/server/protocol/src/lib.rs
@@ -69,6 +69,14 @@ pub struct MapMetadata {
difficulty: i32,
}
+#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
+pub struct Demand {
+ pub input: ItemIndex,
+ pub output: Option<ItemIndex>,
+ pub duration: f32,
+ pub points: i64,
+}
+
#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode, Default)]
#[rustfmt::skip]
pub struct Gamedata {
@@ -79,6 +87,7 @@ pub struct Gamedata {
pub tile_interact: Vec<bool>,
pub maps: HashMap<String, MapMetadata>,
pub recipes: Vec<Recipe>,
+ pub demands: Vec<Demand>,
}
#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]