diff options
Diffstat (limited to 'server/protocol/src/lib.rs')
-rw-r--r-- | server/protocol/src/lib.rs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs index 68af0e63..055b41c6 100644 --- a/server/protocol/src/lib.rs +++ b/server/protocol/src/lib.rs @@ -258,15 +258,15 @@ pub struct Score { #[serde(rename_all = "snake_case")] pub enum Recipe { Passive { - duration: f32, - revert_duration: Option<f32>, + speed: f32, + revert_speed: Option<f32>, tile: Option<TileIndex>, input: ItemIndex, output: Option<ItemIndex>, warn: bool, }, Active { - duration: f32, + speed: f32, tile: Option<TileIndex>, input: ItemIndex, outputs: [Option<ItemIndex>; 2], @@ -323,18 +323,16 @@ impl Recipe { Recipe::Instant { tile, .. } => *tile, } } - pub fn duration(&self) -> Option<f32> { + pub fn speed(&self) -> Option<f32> { match self { - Recipe::Passive { duration, .. } => Some(*duration), - Recipe::Active { duration, .. } => Some(*duration), + Recipe::Passive { speed, .. } => Some(*speed), + Recipe::Active { speed, .. } => Some(*speed), _ => None, } } - pub fn revert_duration(&self) -> Option<f32> { + pub fn revert_speed(&self) -> Option<f32> { match self { - Recipe::Passive { - revert_duration, .. - } => *revert_duration, + Recipe::Passive { revert_speed, .. } => *revert_speed, _ => None, } } |