about summary refs log tree commit diff
path: root/src/Xanthous/App.hs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-09-28T19·01-0400
committerGriffin Smith <root@gws.fyi>2019-09-28T19·03-0400
commitabea2dcfac0e094bf4ce0d378763af7816b04501 (patch)
treefbe772353869571b85c4d73227e642c47acd0f28 /src/Xanthous/App.hs
parent1a0f618a829ec356e29176c77ea90a8a5a0157b4 (diff)
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.
Diffstat (limited to 'src/Xanthous/App.hs')
-rw-r--r--src/Xanthous/App.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs
index 8d9ea54f0f..cff4a4d611 100644
--- a/src/Xanthous/App.hs
+++ b/src/Xanthous/App.hs
@@ -155,6 +155,13 @@ handleCommand Open = do
 
 handleCommand Wait = stepGame >> continue
 
+handleCommand ToggleRevealAll = do
+  val <- debugState . allRevealed <%= not
+  say ["debug", "toggleRevealAll"] $ object [ "revealAll" A..= val ]
+  continue
+
+--------------------------------------------------------------------------------
+
 handlePromptEvent
   :: Text -- ^ Prompt message
   -> Prompt AppM