From abea2dcfac0e094bf4ce0d378763af7816b04501 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 28 Sep 2019 15:01:21 -0400 Subject: Add debug command to reveal the game Add a (debug) command to reveal all tiles on the game regardless of the character's vision, which'll make it easier to debug creature's behavior while they're not visible. --- src/Xanthous/Command.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Xanthous/Command.hs') diff --git a/src/Xanthous/Command.hs b/src/Xanthous/Command.hs index c2dbfe37efa6..4bf0e2893908 100644 --- a/src/Xanthous/Command.hs +++ b/src/Xanthous/Command.hs @@ -17,6 +17,9 @@ data Command | Open | Wait + -- | TODO replace with `:` commands + | ToggleRevealAll + commandFromKey :: Key -> [Modifier] -> Maybe Command commandFromKey (KChar 'q') [] = Just Quit commandFromKey (KChar '.') [] = Just Wait @@ -24,6 +27,7 @@ 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 'r') [MMeta] = Just ToggleRevealAll commandFromKey _ _ = Nothing -------------------------------------------------------------------------------- -- cgit 1.4.1