From dff11a831660c9de84d716acc653e92f3b5fd9c5 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Fri, 14 Feb 2020 00:07:29 -0500 Subject: [PATCH] assume goalie is active on creation of rookie --- src/Mtlstats/Control/CreateGoalie.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mtlstats/Control/CreateGoalie.hs b/src/Mtlstats/Control/CreateGoalie.hs index 4e445fc..e994ece 100644 --- a/src/Mtlstats/Control/CreateGoalie.hs +++ b/src/Mtlstats/Control/CreateGoalie.hs @@ -52,7 +52,11 @@ getRookieFlagC = Controller C.drawString "Is this goalie a rookie? (Y/N)" return C.CursorInvisible , handleController = \e -> do - modify $ progMode.createGoalieStateL.cgsRookieFlag .~ ynHandler e + modify $ case ynHandler e of + Just True -> progMode.createGoalieStateL + %~ (cgsRookieFlag ?~ True) + . (cgsActiveFlag ?~ True) + rf -> progMode.createGoalieStateL.cgsRookieFlag .~ rf return True }