Remove section-wide indentation
This commit is contained in:
@@ -124,17 +124,18 @@ tryDropSelected mpos w = do
|
||||
tryPickupSelected :: Maybe (Int,Int) -> World -> Maybe World
|
||||
tryPickupSelected mpos w = do
|
||||
guard $ maybe True (\(i,_) -> i == 0) mpos
|
||||
cr <- w ^? cWorld . lWorld . creatures . ix 0
|
||||
let nfreeslots = crNumFreeSlots cr
|
||||
-- cr <- w ^? cWorld . lWorld . creatures . ix 0
|
||||
-- let nfreeslots = crNumFreeSlots cr
|
||||
(3, _) <- w ^? hud . hudElement . diSelection . _Just
|
||||
xs <- w ^? hud . hudElement . diSelectionExtra
|
||||
OverInvDrag 3 x <- w ^? input . mouseContext
|
||||
-- xs <- w ^? hud . hudElement . diSelectionExtra
|
||||
-- OverInvDrag 3 x <- w ^? input . mouseContext
|
||||
return w
|
||||
-- return $ IS.foldr (dropItem cr) w xs
|
||||
|
||||
updateMouseReleaseInGame :: World -> World
|
||||
updateMouseReleaseInGame w = case w ^. input . mouseContext of
|
||||
OverInvDrag i mpos ->
|
||||
--OverInvDrag i mpos ->
|
||||
OverInvDrag _ mpos ->
|
||||
input . mouseContext .~ MouseInGame $
|
||||
fromMaybe w $ tryDropSelected mpos w <|> tryPickupSelected mpos w
|
||||
-- OverInvDrag i mpos -> fromMaybe (dropSelected w & input . mouseContext .~ MouseInGame) $ do
|
||||
@@ -206,7 +207,8 @@ updateMouseClickInGame cfig w = case w ^. input . mouseContext of
|
||||
|
||||
startDrag :: (Int, Int) -> World -> World
|
||||
startDrag (a, b) w = fromMaybe (augInvDirectSelect (a, b) $ setmichosen mempty w) $ do
|
||||
(i, j) <- w ^? hud . hudElement . diSelection . _Just
|
||||
--(i, j) <- w ^? hud . hudElement . diSelection . _Just
|
||||
(i, _) <- w ^? hud . hudElement . diSelection . _Just
|
||||
xs <- w ^? hud . hudElement . diSelectionExtra
|
||||
guard $ i == a && b `IS.member` xs
|
||||
return $ setmichosen xs w
|
||||
|
||||
Reference in New Issue
Block a user