From 13516911366a484ee5484166520133e056010515 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 23 Dec 2019 18:10:22 -0500 Subject: Don't send the welcome message when loading Don't re-send the welcome message when loading the game if it's already been sent. This is done by just tracking whether or not we've sent it as a boolean in the game state, which may be a bit of a hack but should be fine --- src/Xanthous/Game/State.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Xanthous/Game/State.hs') diff --git a/src/Xanthous/Game/State.hs b/src/Xanthous/Game/State.hs index d8a0f0b32077..0ba7b2744a80 100644 --- a/src/Xanthous/Game/State.hs +++ b/src/Xanthous/Game/State.hs @@ -11,6 +11,7 @@ module Xanthous.Game.State , messageHistory , randomGen , activePanel + , sentWelcome , promptState , characterEntityID , GamePromptState(..) @@ -405,6 +406,7 @@ data GameState = GameState , _characterEntityID :: !EntityID , _messageHistory :: !MessageHistory , _randomGen :: !StdGen + , _sentWelcome :: Bool -- | The active panel displayed in the UI, if any , _activePanel :: !(Maybe Panel) @@ -425,6 +427,8 @@ instance Eq GameState where , gs ^. revealedPositions , gs ^. characterEntityID , gs ^. messageHistory + , gs ^. sentWelcome + , gs ^. activePanel ) -------------------------------------------------------------------------------- -- cgit 1.4.1