From 9bdb81bb34bd6a7e33c47d6fcb3dced1c5bda991 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 18 Jun 2024 09:57:39 +0200 Subject: can start passive recipes --- server/src/recipes.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server/src/recipes.rs') diff --git a/server/src/recipes.rs b/server/src/recipes.rs index 11c455ba..b99cd21e 100644 --- a/server/src/recipes.rs +++ b/server/src/recipes.rs @@ -73,3 +73,11 @@ impl Gamedata { self.tile_names.iter().position(|t| t == name) } } +impl Action { + pub fn duration(&self) -> f32 { + match self { + Action::Instant | Action::Never => 0., + Action::Passive(x) | Action::Active(x) => *x, + } + } +} -- cgit v1.2.3-70-g09d2