diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-18 09:57:39 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:20:50 +0200 |
commit | 9bdb81bb34bd6a7e33c47d6fcb3dced1c5bda991 (patch) | |
tree | f99e521bf3b199162ed3e4e45536e944fe634489 /server/src/recipes.rs | |
parent | a99aa006599827ea999a5684e40635175c8d790a (diff) | |
download | hurrycurry-9bdb81bb34bd6a7e33c47d6fcb3dced1c5bda991.tar hurrycurry-9bdb81bb34bd6a7e33c47d6fcb3dced1c5bda991.tar.bz2 hurrycurry-9bdb81bb34bd6a7e33c47d6fcb3dced1c5bda991.tar.zst |
can start passive recipes
Diffstat (limited to 'server/src/recipes.rs')
-rw-r--r-- | server/src/recipes.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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, + } + } +} |