about summary refs log tree commit diff
path: root/users/grfn/xanthous/src/Xanthous/Command.hs
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-06-19T19·40-0400
committergrfn <grfn@gws.fyi>2021-06-23T21·52+0000
commitf0c167d361779512456c7d7a0185802f9910c8ce (patch)
treeddeb7454271ffadcf726e8d906a1d5e93df84670 /users/grfn/xanthous/src/Xanthous/Command.hs
parentd8bd8e7eea5dcef4901bee14b8fe3027fd8605ac (diff)
feat(xanthous): Add a command to describe an item in the inventory r/2680
Add a new DescribeInventory command, bound to I, to prompt for an item
in the inventory (anywhere in the inventory, including wielded) and
display a (new) panel describing it in detail. This description includes
the description, the long description, and the item's physical
properties (volume, density, and weight).

Change-Id: Idc1a05ab16b4514728d42aa6b520f93bea807c07
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3227
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/grfn/xanthous/src/Xanthous/Command.hs')
-rw-r--r--users/grfn/xanthous/src/Xanthous/Command.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/users/grfn/xanthous/src/Xanthous/Command.hs b/users/grfn/xanthous/src/Xanthous/Command.hs
index 1d0014d78792..30359c6c6407 100644
--- a/users/grfn/xanthous/src/Xanthous/Command.hs
+++ b/users/grfn/xanthous/src/Xanthous/Command.hs
@@ -24,6 +24,7 @@ data Command
   | Save
   | Read
   | ShowInventory
+  | DescribeInventory
   | Wield
   | GoUp
   | GoDown
@@ -50,6 +51,7 @@ commandFromKey (KChar 'e') [] = Just Eat
 commandFromKey (KChar 'S') [] = Just Save
 commandFromKey (KChar 'r') [] = Just Read
 commandFromKey (KChar 'i') [] = Just ShowInventory
+commandFromKey (KChar 'I') [] = Just DescribeInventory
 commandFromKey (KChar 'w') [] = Just Wield
 commandFromKey (KChar '<') [] = Just GoUp
 commandFromKey (KChar '>') [] = Just GoDown