Fix wall zoning
This commit is contained in:
@@ -35,6 +35,7 @@ import Control.Applicative
|
||||
--import Data.Monoid
|
||||
--import System.Random
|
||||
import qualified Streaming.Prelude as S
|
||||
import SDL
|
||||
--import Streaming
|
||||
|
||||
{- For most menus the only way to change the world is using event handling. -}
|
||||
@@ -57,6 +58,7 @@ functionalUpdate cfig w = checkEndGame
|
||||
-- . updateRandGen
|
||||
. (mouseButtons . each .~ True) -- to determine if the mouse button is held
|
||||
. (worldClock +~ 1)
|
||||
. updateWorldSelect
|
||||
. doRewind
|
||||
. (doubleMouseHammer %~ moveHammerUp)
|
||||
. updateDistortions
|
||||
@@ -100,6 +102,11 @@ functionalUpdate cfig w = checkEndGame
|
||||
where
|
||||
(x,y) = cloudZoneOfPoint $ stripZ $ _clPos cl
|
||||
|
||||
updateWorldSelect :: World -> World
|
||||
updateWorldSelect w = case w ^? mouseButtons . ix ButtonLeft of
|
||||
Nothing -> w
|
||||
Just False -> w & wSelect . _1 .~ mouseWorldPos w
|
||||
Just True -> w & wSelect . _2 .~ mouseWorldPos w
|
||||
|
||||
mcChooseUpdate :: Machine -> Machine -> World -> World
|
||||
mcChooseUpdate mc mc'
|
||||
|
||||
Reference in New Issue
Block a user