Cleanup
This commit is contained in:
+6
-6
@@ -51,12 +51,12 @@ seedStartOptions =
|
||||
trySeedFromClipboard :: Universe -> IO (Maybe Universe)
|
||||
trySeedFromClipboard u = do
|
||||
mcstr <- getClipboardString
|
||||
case mcstr of
|
||||
Nothing -> pushScreen (seedStartMenu "INPUT UNUSABLE") (u & menuLayers %~ tail)
|
||||
Just str -> do
|
||||
case readMaybe str of
|
||||
Nothing -> pushScreen (seedStartMenu "INPUT UNUSABLE") (u & menuLayers %~ tail)
|
||||
Just i -> return . Just $ startSeedGame i u
|
||||
case mcstr >>= readMaybe of
|
||||
Nothing -> sayinputunusable
|
||||
Just i -> return . Just $ startSeedGame i u
|
||||
where
|
||||
sayinputunusable = pushScreen (seedStartMenu "INPUT UNUSABLE, EXPECTING INTEGER")
|
||||
(u & menuLayers %~ tail)
|
||||
|
||||
slTitleOptions :: String -> [MenuOption] -> ScreenLayer
|
||||
slTitleOptions title ops = slTitleOptionsEff title ops (popScreen . writeConfig)
|
||||
|
||||
Reference in New Issue
Block a user