diff options
| author | troido <troido@protonmail.com> | 2020-02-22 23:41:51 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-22 23:41:51 +0100 |
| commit | 522aad7889cd62e96af7c420789507ccbf5b7aaa (patch) | |
| tree | bfb3c21d627552bcda6f2743854cee920722fd3b /src/controls.rs | |
| parent | f4331041e5d906f95063f317852f32f19e6cdf9c (diff) | |
it is now possible to use items
Diffstat (limited to 'src/controls.rs')
| -rw-r--r-- | src/controls.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/controls.rs b/src/controls.rs index 36d7c77..29d45a0 100644 --- a/src/controls.rs +++ b/src/controls.rs @@ -43,7 +43,8 @@ impl Direction { pub enum Control { Move(Direction), Take(Option<usize>), - Drop(usize) + Drop(usize), + Use(usize) } @@ -57,6 +58,7 @@ impl Control { }, "take" => Some(Control::Take(val.get(1)?.as_u64().map(|idx| idx as usize))), "drop" => Some(Control::Drop(val.get(1)?.as_u64().unwrap_or(0) as usize)), + "use" => Some(Control::Use(val.get(1)?.as_u64().unwrap_or(0) as usize)), _ => None } } else {None} |
