implemented lifetime goals editing
This commit is contained in:
@@ -26,6 +26,7 @@ module Mtlstats.Prompt.EditPlayer
|
||||
, editPlayerYtdGoalsPrompt
|
||||
, editPlayerYtdAssistsPrompt
|
||||
, editPlayerYtdPMinPrompt
|
||||
, editPlayerLtGoalsPrompt
|
||||
) where
|
||||
|
||||
import Control.Monad.Extra (whenJustM)
|
||||
@@ -66,6 +67,11 @@ editPlayerYtdPMinPrompt :: Prompt
|
||||
editPlayerYtdPMinPrompt = numPrompt "Year-to-date penalty minutes: " $
|
||||
editPlayer . (pYtd.psPMin .~)
|
||||
|
||||
-- | Prompt to edit a player's lifetime goals
|
||||
editPlayerLtGoalsPrompt :: Prompt
|
||||
editPlayerLtGoalsPrompt = numPrompt "Lifetime goals: " $
|
||||
editPlayer . (pLifetime.psGoals .~)
|
||||
|
||||
editPlayer :: (Player -> Player) -> Action ()
|
||||
editPlayer f =
|
||||
whenJustM (gets (^.progMode.editPlayerStateL.epsSelectedPlayer)) $ \pid ->
|
||||
|
||||
Reference in New Issue
Block a user