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/App.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Xanthous/App.hs') 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 -- cgit 1.4.1