Cleanup
This commit is contained in:
+5
-5
@@ -78,11 +78,11 @@ updateUniverse u = case _menuLayers u of
|
||||
functionalUpdate :: Universe -> Universe
|
||||
functionalUpdate w = checkEndGame
|
||||
-- . updateRandGen
|
||||
. over uvWorld (cWorld . mouseButtons . each .~ True) -- to determine if the mouse button is held
|
||||
. over uvWorld (mouseButtons . each .~ True) -- to determine if the mouse button is held
|
||||
. over uvWorld (cWorld . worldClock +~ 1)
|
||||
. over uvWorld updateWorldSelect
|
||||
. over uvWorld doRewind
|
||||
. over uvWorld (cWorld . hammers . each %~ moveHammerUp)
|
||||
. over uvWorld (hammers . each %~ moveHammerUp)
|
||||
. over uvWorld updateDistortions
|
||||
. over uvWorld updateCreatureSoundPositions
|
||||
. over uvWorld ppEvents
|
||||
@@ -148,7 +148,7 @@ zoneClouds w = w
|
||||
--runIdentity (S.fold_ (flip $ updateZoning (:)) (zn & znObjects .~ mempty) id (_clouds w))
|
||||
|
||||
updateWorldSelect :: World -> World
|
||||
updateWorldSelect w = f . g $ case (w ^? cWorld . mouseButtons . ix ButtonLeft, w ^? cWorld . mouseButtons . ix ButtonRight) of
|
||||
updateWorldSelect w = f . g $ case (w ^? mouseButtons . ix ButtonLeft, w ^? mouseButtons . ix ButtonRight) of
|
||||
(Nothing ,Nothing) -> w
|
||||
(Just False,Nothing) -> w & cWorld . lLine . _1 .~ mwp
|
||||
(Just True ,Nothing) -> w & cWorld . lLine . _2 .~ mwp
|
||||
@@ -157,9 +157,9 @@ updateWorldSelect w = f . g $ case (w ^? cWorld . mouseButtons . ix ButtonLeft,
|
||||
(Just True ,_) -> w & cWorld . rLine . _2 .~ mwp
|
||||
where
|
||||
mwp = mouseWorldPos w
|
||||
f | ButtonLeft `M.member` _mouseButtons (_cWorld w) = cWorld . lSelect .~ mwp
|
||||
f | ButtonLeft `M.member` _mouseButtons w = cWorld . lSelect .~ mwp
|
||||
| otherwise = id
|
||||
g | ButtonRight `M.member` _mouseButtons (_cWorld w) = cWorld . rSelect .~ mwp
|
||||
g | ButtonRight `M.member` _mouseButtons w = cWorld . rSelect .~ mwp
|
||||
| otherwise = id
|
||||
|
||||
--mcChooseUpdate :: Machine -> Machine -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user