Fix wall zoning

This commit is contained in:
2022-06-27 09:56:54 +01:00
parent 7778fb0403
commit 90af97ee22
15 changed files with 128 additions and 34 deletions
+7
View File
@@ -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'