diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-17 23:41:25 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:20:50 +0200 |
commit | a99aa006599827ea999a5684e40635175c8d790a (patch) | |
tree | 1b36a73833d3a87384e7bbfb379c4adceb72cd27 /server/src/recipes.rs | |
parent | 6f0424b9b4cddc0495eb673d314c570e27e61e83 (diff) | |
download | hurrycurry-a99aa006599827ea999a5684e40635175c8d790a.tar hurrycurry-a99aa006599827ea999a5684e40635175c8d790a.tar.bz2 hurrycurry-a99aa006599827ea999a5684e40635175c8d790a.tar.zst |
a
Diffstat (limited to 'server/src/recipes.rs')
-rw-r--r-- | server/src/recipes.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/recipes.rs b/server/src/recipes.rs index 25a4be98..11c455ba 100644 --- a/server/src/recipes.rs +++ b/server/src/recipes.rs @@ -1,13 +1,14 @@ use crate::protocol::{ItemIndex, TileIndex}; use serde::{Deserialize, Serialize}; -#[derive(Debug, Deserialize, Serialize, Clone, Copy)] +#[derive(Debug, Deserialize, Serialize, Clone, Copy, Default)] #[serde(rename_all = "snake_case")] pub enum Action { + #[default] + Never, Passive(f32), Active(f32), Instant, - Never, } #[derive(Debug, Clone, Deserialize, Serialize)] @@ -17,6 +18,7 @@ pub struct Recipe<T = TileIndex, I = ItemIndex> { pub inputs: Vec<I>, #[serde(default)] pub outputs: Vec<I>, + #[serde(default)] pub action: Action, } |