From 0abcd8c9581f0017cb2bd59a09e93800ea8f3b1f Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Fri, 29 Nov 2019 15:43:46 -0500 Subject: 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. --- src/Xanthous/Command.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Xanthous/Command.hs') 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 -------------------------------------------------------------------------------- -- cgit 1.4.1