diff options
author | Griffin Smith <root@gws.fyi> | 2019-11-29T20·43-0500 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2019-11-30T02·25-0500 |
commit | 0abcd8c9581f0017cb2bd59a09e93800ea8f3b1f (patch) | |
tree | 0dab0269ec6c08df6eef8f124aca2f8076c9e040 /src/Xanthous/Command.hs | |
parent | f37d0f75c0b4a77c8e35192c24c6fdb6f2bc4619 (diff) |
Implement a "look" command
Implement the PointOnMap prompt type, which allows the player to move the cursor around and select a position on the map, and use this prompt type to implement a "look" command, describing all entities at the selected position.
Diffstat (limited to 'src/Xanthous/Command.hs')
-rw-r--r-- | src/Xanthous/Command.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Xanthous/Command.hs b/src/Xanthous/Command.hs index 74808443d34c..35a8ce367269 100644 --- a/src/Xanthous/Command.hs +++ b/src/Xanthous/Command.hs @@ -17,6 +17,7 @@ data Command | Open | Wait | Eat + | Look | Save -- | TODO replace with `:` commands @@ -29,9 +30,12 @@ commandFromKey (KChar (directionFromChar -> Just dir)) [] = Just $ Move dir commandFromKey (KChar 'p') [MCtrl] = Just PreviousMessage commandFromKey (KChar ',') [] = Just PickUp commandFromKey (KChar 'o') [] = Just Open +commandFromKey (KChar ';') [] = Just Look commandFromKey (KChar 'e') [] = Just Eat -commandFromKey (KChar 'r') [MMeta] = Just ToggleRevealAll commandFromKey (KChar 'S') [] = Just Save + +commandFromKey (KChar 'r') [MMeta] = Just ToggleRevealAll + commandFromKey _ _ = Nothing -------------------------------------------------------------------------------- |