Remove useless code
This commit is contained in:
@@ -212,7 +212,6 @@ functionalUpdate :: Universe -> Universe
|
||||
functionalUpdate w =
|
||||
checkEndGame
|
||||
. over uvWorld (cWorld . lWorld . lClock +~ 1)
|
||||
. over uvWorld updateWorldSelect'
|
||||
. over uvWorld updateDistortions
|
||||
. over uvWorld updateCreatureSoundPositions
|
||||
. over uvWorld ppEvents
|
||||
@@ -296,38 +295,6 @@ updateLasers w =
|
||||
zoneClouds :: World -> World
|
||||
zoneClouds w = w & clZoning .~ foldl' (flip zoneCloud) mempty (w ^. cWorld . lWorld . clouds)
|
||||
|
||||
updateWorldSelect' :: World -> World
|
||||
updateWorldSelect' w = over input (updateWorldSelect (w ^. wCam)) w
|
||||
|
||||
updateWorldSelect :: Camera -> Input -> Input
|
||||
updateWorldSelect cam inp = f . g $ case (inp ^? mouseButtons . ix ButtonLeft, inp ^? mouseButtons . ix ButtonRight) of
|
||||
(Just 1, Nothing) ->
|
||||
inp & lLine . _1 .~ mwp
|
||||
& lrLine . _1 .~ mwp
|
||||
(Just _, Nothing) ->
|
||||
inp & lLine . _2 .~ mwp
|
||||
& lrLine . _1 .~ mwp
|
||||
(Nothing, Just 1) ->
|
||||
inp & rLine . _1 .~ mwp
|
||||
& lrLine . _2 .~ mwp
|
||||
(Nothing, Just _) ->
|
||||
inp & rLine . _2 .~ mwp
|
||||
& lrLine . _2 .~ mwp
|
||||
_ -> inp
|
||||
where
|
||||
mwp = mouseWorldPos inp cam
|
||||
f
|
||||
| ButtonLeft `M.member` _mouseButtons inp = lSelect .~ mwp
|
||||
| otherwise = id
|
||||
g
|
||||
| ButtonRight `M.member` _mouseButtons inp = rSelect .~ mwp
|
||||
| otherwise = id
|
||||
|
||||
--mcChooseUpdate :: Machine -> Machine -> World -> World
|
||||
--mcChooseUpdate mc mc'
|
||||
-- | _mcHP mc > 0 = _mcUpdate mc mc'
|
||||
-- | otherwise = destroyMachine mc
|
||||
|
||||
displayTerminalLineString :: TerminalLineString -> World -> (String, Color)
|
||||
displayTerminalLineString tls = case tls of
|
||||
TerminalLineConst str col -> const (str, col)
|
||||
|
||||
Reference in New Issue
Block a user