summaryrefslogtreecommitdiff
path: root/server/src/data.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-21 00:12:13 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-23 19:24:39 +0200
commita1f6b4f47e7aca167e71311d55c3e9a18f4cbff7 (patch)
treeb928cf5ae7b8179f029fbd36f46487dedf582fc7 /server/src/data.rs
parent10aaa4f56642e30b2886735363eb12dfa88e2b70 (diff)
downloadhurrycurry-a1f6b4f47e7aca167e71311d55c3e9a18f4cbff7.tar
hurrycurry-a1f6b4f47e7aca167e71311d55c3e9a18f4cbff7.tar.bz2
hurrycurry-a1f6b4f47e7aca167e71311d55c3e9a18f4cbff7.tar.zst
show bad passive recipes in red
Diffstat (limited to 'server/src/data.rs')
-rw-r--r--server/src/data.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/server/src/data.rs b/server/src/data.rs
index fd6f266d..17b508ec 100644
--- a/server/src/data.rs
+++ b/server/src/data.rs
@@ -19,13 +19,15 @@ pub enum Action {
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecipeDecl {
#[serde(default)]
- pub tile: Option<String>,
+ tile: Option<String>,
#[serde(default)]
- pub inputs: Vec<String>,
+ inputs: Vec<String>,
#[serde(default)]
- pub outputs: Vec<String>,
+ outputs: Vec<String>,
#[serde(default)]
- pub action: Action,
+ action: Action,
+ #[serde(default)]
+ warn: bool,
}
#[derive(Debug, Clone, Deserialize)]
@@ -92,6 +94,7 @@ pub fn build_gamedata(
Action::Never => {}
Action::Passive(duration) => recipes.push(Recipe::Passive {
duration,
+ warn: r.warn,
tile,
input: inputs.next().expect("passive recipe without input"),
output: outputs.next(),